diff options
author | Andreas Fritiofson <andreas.fritiofson@gmail.com> | 2014-03-10 22:23:07 +0100 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2014-03-17 12:47:18 +0000 |
commit | 565f8481c7b71614a05d79ab79af8610d2535a81 (patch) | |
tree | e37bd29bd71c8c83046a4b91536405542e722d84 /src/flash/nor/lpc2900.c | |
parent | cd091c36305d9d2de838c7ba145ee7547e4e1640 (diff) |
flash: Constify write buffer
Change-Id: Ic812098d3ed5a2992c26bb57d08ae350e2c5d5d8
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/2040
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src/flash/nor/lpc2900.c')
-rw-r--r-- | src/flash/nor/lpc2900.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/flash/nor/lpc2900.c b/src/flash/nor/lpc2900.c index 018d94ad..7c3e6758 100644 --- a/src/flash/nor/lpc2900.c +++ b/src/flash/nor/lpc2900.c @@ -1058,7 +1058,7 @@ static int lpc2900_protect(struct flash_bank *bank, int set, int first, int last * @param offset Start address (relative to bank start) * @param count Number of bytes to be programmed */ -static int lpc2900_write(struct flash_bank *bank, uint8_t *buffer, +static int lpc2900_write(struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) { uint8_t page[FLASH_PAGE_SIZE]; @@ -1186,7 +1186,7 @@ static int lpc2900_write(struct flash_bank *bank, uint8_t *buffer, /* Write to flash in large blocks */ while (count != 0) { uint32_t this_npages; - uint8_t *this_buffer; + const uint8_t *this_buffer; int start_sector = lpc2900_address2sector(bank, offset); /* First page / last page / rest */ |