X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fflash%2Fnor%2Fpic32mx.c;h=5e82ba63d58b08c72255e1f0b06bee72f548ec73;hb=565f8481c7b71614a05d79ab79af8610d2535a81;hp=2b27ec5b8bd5cddbc812e0dfa0867c1a69f81baf;hpb=cd091c36305d9d2de838c7ba145ee7547e4e1640;p=openocd diff --git a/src/flash/nor/pic32mx.c b/src/flash/nor/pic32mx.c index 2b27ec5b..5e82ba63 100644 --- a/src/flash/nor/pic32mx.c +++ b/src/flash/nor/pic32mx.c @@ -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);