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;
;
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;
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;