diff options
author | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-06-23 22:45:47 +0000 |
---|---|---|
committer | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-06-23 22:45:47 +0000 |
commit | 6d1d58a1fc3dfd60e9cac89460b5a6e438d11efa (patch) | |
tree | 9f1465d0768f8fde40053f539296f895d7e4e0ac /src/flash/ocl/at91sam7x | |
parent | fb1a9b2cb2f844a17d26dfeb3d26849364d93e26 (diff) | |
download | openocd_libswd-6d1d58a1fc3dfd60e9cac89460b5a6e438d11efa.tar.gz openocd_libswd-6d1d58a1fc3dfd60e9cac89460b5a6e438d11efa.tar.bz2 openocd_libswd-6d1d58a1fc3dfd60e9cac89460b5a6e438d11efa.tar.xz openocd_libswd-6d1d58a1fc3dfd60e9cac89460b5a6e438d11efa.zip |
- Fixes '[<>]' whitespace
- Replace ')\([<>]\)(' with ') \1 ('.
- Replace ')\([<>]\)\(\w\)' with ') \1 \2'.
- Replace '\(\w\)\([<>]\)(' with '\1 \2 ('.
- Replace '\(\w\)\([<>]\)\(\w\)' with '\1 \2 \3'.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2375 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/flash/ocl/at91sam7x')
-rw-r--r-- | src/flash/ocl/at91sam7x/main.c | 8 | ||||
-rw-r--r-- | src/flash/ocl/at91sam7x/samflash.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/flash/ocl/at91sam7x/main.c b/src/flash/ocl/at91sam7x/main.c index c675b20a..2146d74e 100644 --- a/src/flash/ocl/at91sam7x/main.c +++ b/src/flash/ocl/at91sam7x/main.c @@ -45,13 +45,13 @@ void cmd_flash(uint32 cmd) bi_start = ofs/4; bi_end = (ofs + len + 3)/4; - if (bi_end>BUFSIZE) { + if (bi_end > BUFSIZE) { dcc_wr(OCL_BUFF_OVER); return; } chksum = OCL_CHKS_INIT; - for (bi = 0; bi<bi_end; bi++) chksum^=buffer[bi]=dcc_rd(); + for (bi = 0; bi < bi_end; bi++) chksum^=buffer[bi]=dcc_rd(); if (dcc_rd() != chksum) { dcc_wr(OCL_CHKS_FAIL); @@ -59,12 +59,12 @@ void cmd_flash(uint32 cmd) } /* fill in unused positions with unprogrammed values */ - for (bi = 0; bi<bi_start; bi++) buffer[bi]=0xffffffff; + for (bi = 0; bi < bi_start; bi++) buffer[bi]=0xffffffff; for (bi = bi_end; bi%flash_page_size; bi++) buffer[bi]=0xffffffff; result = 0; pagenum = adr/flash_page_size; - for (bi = 0; bi<bi_end; bi += flash_page_size/4) { + for (bi = 0; bi < bi_end; bi += flash_page_size/4) { result = flash_page_program(buffer + bi, pagenum++); if (result) break; } diff --git a/src/flash/ocl/at91sam7x/samflash.c b/src/flash/ocl/at91sam7x/samflash.c index 6f7bf5f5..bcb6dd09 100644 --- a/src/flash/ocl/at91sam7x/samflash.c +++ b/src/flash/ocl/at91sam7x/samflash.c @@ -146,7 +146,7 @@ int flash_erase_plane(int efc_ofs) if ((inr(MC_FSR + efc_ofs)&MC_LOCKE)) return FLASH_STAT_LOCKE; } - if ((page_num += flash_lock_pages)>flash_page_count) break; + if ((page_num += flash_lock_pages) > flash_page_count) break; lockbits>>=1; } @@ -178,7 +178,7 @@ int flash_erase_all(void) if ((result = flash_erase_plane(0)) != FLASH_STAT_OK) return result; /* the second flash controller, if any */ - if (flash_page_count>1024) result = flash_erase_plane(0x10); + if (flash_page_count > 1024) result = flash_erase_plane(0x10); return result; } |