aboutsummaryrefslogtreecommitdiff
path: root/src/nxp_tgt.c
diff options
context:
space:
mode:
authorGareth McMullin2013-06-17 15:53:32 +1200
committerGareth McMullin2013-06-17 15:53:32 +1200
commit8c877d6dfa5aff2b70ce2c96ef6314bcae7a25c2 (patch)
treeedb96d39d96f3969796d54fa09ccca4827318395 /src/nxp_tgt.c
parent2d63dd4b5b01df2406cda71ee1fb08968b14fd0a (diff)
Fix trailing whitespace everywhere.
Diffstat (limited to 'src/nxp_tgt.c')
-rw-r--r--src/nxp_tgt.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nxp_tgt.c b/src/nxp_tgt.c
index ccb2cc6..83f37ba 100644
--- a/src/nxp_tgt.c
+++ b/src/nxp_tgt.c
@@ -51,10 +51,10 @@ static struct flash_program flash_pgm;
static void lpc11x_iap_call(struct target_s *target, struct flash_param *param, unsigned param_len);
static int lpc11xx_flash_prepare(struct target_s *target, uint32_t addr, int len);
static int lpc11xx_flash_erase(struct target_s *target, uint32_t addr, int len);
-static int lpc11xx_flash_write(struct target_s *target, uint32_t dest, const uint8_t *src,
+static int lpc11xx_flash_write(struct target_s *target, uint32_t dest, const uint8_t *src,
int len);
-/*
+/*
* Note that this memory map is actually for the largest of the lpc11xx devices;
* There seems to be no good way to decode the part number to determine the RAM
* and flash sizes.
@@ -143,7 +143,7 @@ lpc11x_iap_call(struct target_s *target, struct flash_param *param, unsigned par
static int
lpc11xx_flash_prepare(struct target_s *target, uint32_t addr, int len)
-{
+{
/* prepare the sector(s) to be erased */
memset(&flash_pgm.p, 0, sizeof(flash_pgm.p));
flash_pgm.p.command[0] = IAP_CMD_PREPARE;
@@ -196,15 +196,15 @@ lpc11xx_flash_write(struct target_s *target, uint32_t dest, const uint8_t *src,
unsigned chunk;
for (chunk = first_chunk; chunk <= last_chunk; chunk++) {
-
+
DEBUG("chunk %u len %d\n", chunk, len);
/* first and last chunk may require special handling */
if ((chunk == first_chunk) || (chunk == last_chunk)) {
/* fill with all ff to avoid sector rewrite corrupting other writes */
memset(flash_pgm.data, 0xff, sizeof(flash_pgm.data));
-
- /* copy as much as fits */
+
+ /* copy as much as fits */
int copylen = IAP_PGM_CHUNKSIZE - chunk_offset;
if (copylen > len)
copylen = len;