Whitespace.
This commit is contained in:
parent
1366c32f89
commit
5c337c9aa7
10
src/samd.c
10
src/samd.c
|
@ -566,7 +566,8 @@ static bool samd_cmd_erase_all(target *t)
|
||||||
{
|
{
|
||||||
/* Clear the DSU status bits */
|
/* Clear the DSU status bits */
|
||||||
target_mem_write32(t, SAMD_DSU_CTRLSTAT,
|
target_mem_write32(t, SAMD_DSU_CTRLSTAT,
|
||||||
(SAMD_STATUSA_DONE | SAMD_STATUSA_PERR | SAMD_STATUSA_FAIL));
|
SAMD_STATUSA_DONE | SAMD_STATUSA_PERR |
|
||||||
|
SAMD_STATUSA_FAIL);
|
||||||
|
|
||||||
/* Erase all */
|
/* Erase all */
|
||||||
target_mem_write32(t, SAMD_DSU_CTRLSTAT, SAMD_CTRL_CHIP_ERASE);
|
target_mem_write32(t, SAMD_DSU_CTRLSTAT, SAMD_CTRL_CHIP_ERASE);
|
||||||
|
@ -633,14 +634,17 @@ static bool samd_set_flashlock(target *t, uint16_t value)
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool samd_cmd_lock_flash(target *t)
|
static bool samd_cmd_lock_flash(target *t)
|
||||||
{
|
{
|
||||||
return samd_set_flashlock(t, 0x0000);
|
return samd_set_flashlock(t, 0x0000);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool samd_cmd_unlock_flash(target *t)
|
static bool samd_cmd_unlock_flash(target *t)
|
||||||
{
|
{
|
||||||
return samd_set_flashlock(t, 0xFFFF);
|
return samd_set_flashlock(t, 0xFFFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool samd_cmd_read_userrow(target *t)
|
static bool samd_cmd_read_userrow(target *t)
|
||||||
{
|
{
|
||||||
gdb_outf("User Row: 0x%08x%08x\n",
|
gdb_outf("User Row: 0x%08x%08x\n",
|
||||||
|
@ -649,6 +653,7 @@ static bool samd_cmd_read_userrow(target *t)
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads the 128-bit serial number from the NVM
|
* Reads the 128-bit serial number from the NVM
|
||||||
*/
|
*/
|
||||||
|
@ -664,6 +669,7 @@ static bool samd_cmd_serial(target *t)
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the size (in bytes) of the current SAM D20's flash memory.
|
* Returns the size (in bytes) of the current SAM D20's flash memory.
|
||||||
*/
|
*/
|
||||||
|
@ -678,6 +684,7 @@ static uint32_t samd_flash_size(target *t)
|
||||||
/* Shift the maximum flash size (256KB) down as appropriate */
|
/* Shift the maximum flash size (256KB) down as appropriate */
|
||||||
return (0x40000 >> (devsel % 5));
|
return (0x40000 >> (devsel % 5));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs the Memory Built In Self Test (MBIST)
|
* Runs the Memory Built In Self Test (MBIST)
|
||||||
*/
|
*/
|
||||||
|
@ -735,3 +742,4 @@ static bool samd_cmd_ssb(target *t)
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue