projects
/
fw
/
openocd
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
flash: add missing stellaris device classes
[fw/openocd]
/
src
/
flash
/
nor
/
str9xpec.c
diff --git
a/src/flash/nor/str9xpec.c
b/src/flash/nor/str9xpec.c
index 6fa66a09ca8300e8786d5a2e14daa06d08fd8192..fc2ed3590f4dd772e910e2cc5913c1c636f08dfc 100644
(file)
--- a/
src/flash/nor/str9xpec.c
+++ b/
src/flash/nor/str9xpec.c
@@
-714,14
+714,9
@@
static int str9xpec_write(struct flash_bank *bank, uint8_t *buffer,
if (bytes_remaining)
{
uint8_t last_dword[8] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
if (bytes_remaining)
{
uint8_t last_dword[8] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
- i = 0;
- while (bytes_remaining > 0)
- {
- last_dword[i++] = *(buffer + bytes_written);
- bytes_remaining--;
- bytes_written++;
- }
+ /* copy the last remaining bytes into the write buffer */
+ memcpy(last_dword, buffer+bytes_written, bytes_remaining);
str9xpec_set_instr(tap, ISC_PROGRAM, TAP_IRPAUSE);
str9xpec_set_instr(tap, ISC_PROGRAM, TAP_IRPAUSE);
@@
-1284,6
+1279,7
@@
static const struct command_registration str9xpec_command_handlers[] = {
.name = "str9xpec",
.mode = COMMAND_ANY,
.help = "str9xpec flash command group",
.name = "str9xpec",
.mode = COMMAND_ANY,
.help = "str9xpec flash command group",
+ .usage = "",
.chain = str9xpec_config_command_handlers,
},
COMMAND_REGISTRATION_DONE
.chain = str9xpec_config_command_handlers,
},
COMMAND_REGISTRATION_DONE