diff options
author | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-06-23 22:42:54 +0000 |
---|---|---|
committer | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-06-23 22:42:54 +0000 |
commit | 84df52f9ea78e2d71bde648a16b69d80404c6421 (patch) | |
tree | 93c683e2ec71d33978585da29c4bcaa73fd37222 /src/flash/str9x.c | |
parent | 3813fda44adcea486b7308423a699f63d79273ee (diff) |
- Fixes '=' whitespace
- 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@2372 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/flash/str9x.c')
-rw-r--r-- | src/flash/str9x.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/flash/str9x.c b/src/flash/str9x.c index 73c86da7..880dac4d 100644 --- a/src/flash/str9x.c +++ b/src/flash/str9x.c @@ -198,11 +198,11 @@ static int str9x_protect_check(struct flash_bank_s *bank) if (str9x_info->bank1) { adr = bank1start + 0x18; - if ((retval=target_write_u16(target, adr, 0x90)) != ERROR_OK) + if ((retval = target_write_u16(target, adr, 0x90)) != ERROR_OK) { return retval; } - if ((retval=target_read_u16(target, adr, &hstatus)) != ERROR_OK) + if ((retval = target_read_u16(target, adr, &hstatus)) != ERROR_OK) { return retval; } @@ -211,11 +211,11 @@ static int str9x_protect_check(struct flash_bank_s *bank) else { adr = bank1start + 0x14; - if ((retval=target_write_u16(target, adr, 0x90)) != ERROR_OK) + if ((retval = target_write_u16(target, adr, 0x90)) != ERROR_OK) { return retval; } - if ((retval=target_read_u32(target, adr, &status)) != ERROR_OK) + if ((retval = target_read_u32(target, adr, &status)) != ERROR_OK) { return retval; } @@ -224,11 +224,11 @@ static int str9x_protect_check(struct flash_bank_s *bank) else { adr = bank1start + 0x10; - if ((retval=target_write_u16(target, adr, 0x90)) != ERROR_OK) + if ((retval = target_write_u16(target, adr, 0x90)) != ERROR_OK) { return retval; } - if ((retval=target_read_u16(target, adr, &hstatus)) != ERROR_OK) + if ((retval = target_read_u16(target, adr, &hstatus)) != ERROR_OK) { return retval; } @@ -236,7 +236,7 @@ static int str9x_protect_check(struct flash_bank_s *bank) } /* read array command */ - if ((retval=target_write_u16(target, adr, 0xFF)) != ERROR_OK) + if ((retval = target_write_u16(target, adr, 0xFF)) != ERROR_OK) { return retval; } @@ -284,24 +284,24 @@ static int str9x_erase(struct flash_bank_s *bank, int first, int last) adr = bank->base + bank->sectors[i].offset; /* erase sectors */ - if ((retval=target_write_u16(target, adr, erase_cmd)) != ERROR_OK) + if ((retval = target_write_u16(target, adr, erase_cmd)) != ERROR_OK) { return retval; } - if ((retval=target_write_u16(target, adr, 0xD0)) != ERROR_OK) + if ((retval = target_write_u16(target, adr, 0xD0)) != ERROR_OK) { return retval; } /* get status */ - if ((retval=target_write_u16(target, adr, 0x70)) != ERROR_OK) + if ((retval = target_write_u16(target, adr, 0x70)) != ERROR_OK) { return retval; } int timeout; - for (timeout=0; timeout<1000; timeout++) { - if ((retval=target_read_u8(target, adr, &status)) != ERROR_OK) + for (timeout = 0; timeout<1000; timeout++) { + if ((retval = target_read_u8(target, adr, &status)) != ERROR_OK) { return retval; } @@ -316,13 +316,13 @@ static int str9x_erase(struct flash_bank_s *bank, int first, int last) } /* clear status, also clear read array */ - if ((retval=target_write_u16(target, adr, 0x50)) != ERROR_OK) + if ((retval = target_write_u16(target, adr, 0x50)) != ERROR_OK) { return retval; } /* read array command */ - if ((retval=target_write_u16(target, adr, 0xFF)) != ERROR_OK) + if ((retval = target_write_u16(target, adr, 0xFF)) != ERROR_OK) { return retval; } @@ -575,7 +575,7 @@ static int str9x_write(struct flash_bank_s *bank, target_write_u16(target, bank_adr, 0x70); int timeout; - for (timeout=0; timeout<1000; timeout++) + for (timeout = 0; timeout<1000; timeout++) { target_read_u8(target, bank_adr, &status); if ( status & 0x80 ) @@ -624,7 +624,7 @@ static int str9x_write(struct flash_bank_s *bank, target_write_u16(target, bank_adr, 0x70); int timeout; - for (timeout=0; timeout<1000; timeout++) + for (timeout = 0; timeout<1000; timeout++) { target_read_u8(target, bank_adr, &status); if ( status & 0x80 ) |