X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fflash%2Fnor%2Fem357.c;h=70a5431ac68880b2827bbc1984a4db091edd6d3e;hb=513436a17accbe5494f763055124be594bef0a45;hp=8f25a89b650a561a5d456bb53fbb5859019efd9d;hpb=cbf4760e15d217c0a83e65f13bddfcbfad7d2fec;p=openocd.git diff --git a/src/flash/nor/em357.c b/src/flash/nor/em357.c index 8f25a89b65..70a5431ac6 100644 --- a/src/flash/nor/em357.c +++ b/src/flash/nor/em357.c @@ -455,7 +455,7 @@ static int em357_protect(struct flash_bank *bank, int set, int first, int last) return em357_write_options(bank); } -static int em357_write_block(struct flash_bank *bank, uint8_t *buffer, +static int em357_write_block(struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) { struct target *target = bank->target; @@ -505,7 +505,7 @@ static int em357_write_block(struct flash_bank *bank, uint8_t *buffer, ; retval = target_write_buffer(target, write_algorithm->address, - sizeof(em357_flash_write_code), (uint8_t *)em357_flash_write_code); + sizeof(em357_flash_write_code), em357_flash_write_code); if (retval != ERROR_OK) return retval; @@ -583,7 +583,7 @@ static int em357_write_block(struct flash_bank *bank, uint8_t *buffer, return retval; } -static int em357_write(struct flash_bank *bank, uint8_t *buffer, +static int em357_write(struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) { struct target *target = bank->target;