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>
This commit is contained in:
Andreas Fritiofson
2014-03-10 22:23:07 +01:00
committed by Spencer Oliver
parent cd091c3630
commit 565f8481c7
39 changed files with 79 additions and 77 deletions
+2 -2
View File
@@ -410,7 +410,7 @@ static uint32_t pic32mx_flash_write_code[] = {
0x00000000 /* nop */
};
static int pic32mx_write_block(struct flash_bank *bank, uint8_t *buffer,
static int pic32mx_write_block(struct flash_bank *bank, const uint8_t *buffer,
uint32_t offset, uint32_t count)
{
struct target *target = bank->target;
@@ -571,7 +571,7 @@ static int pic32mx_write_word(struct flash_bank *bank, uint32_t address, uint32_
return pic32mx_nvm_exec(bank, NVMCON_OP_WORD_PROG, 5);
}
static int pic32mx_write(struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count)
static int pic32mx_write(struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
{
uint32_t words_remaining = (count / 4);
uint32_t bytes_remaining = (count & 0x00000003);