X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fflash%2Fnor%2Fat91samd.c;h=5af61ab4ddcc337e5a64a1ac37bf340b2884aaab;hb=565f8481c7b71614a05d79ab79af8610d2535a81;hp=8b0f14dd173d010a844fdfadf77bed37bd20fed9;hpb=cd091c36305d9d2de838c7ba145ee7547e4e1640;p=openocd diff --git a/src/flash/nor/at91samd.c b/src/flash/nor/at91samd.c index 8b0f14dd..5af61ab4 100644 --- a/src/flash/nor/at91samd.c +++ b/src/flash/nor/at91samd.c @@ -385,7 +385,7 @@ static int samd_erase(struct flash_bank *bank, int first, int last) /* Write an entire row (four pages) from host buffer 'buf' to row-aligned * 'address' in the Flash. */ static int samd_write_row(struct flash_bank *bank, uint32_t address, - uint8_t *buf) + const uint8_t *buf) { int res; struct samd_info *chip = (struct samd_info *)bank->driver_priv; @@ -424,7 +424,7 @@ static int samd_write_row(struct flash_bank *bank, uint32_t address, /* Write partial contents into row-aligned 'address' on the Flash from host * buffer 'buf' by writing 'nb' of 'buf' at 'row_offset' into the Flash row. */ static int samd_write_row_partial(struct flash_bank *bank, uint32_t address, - uint8_t *buf, uint32_t row_offset, uint32_t nb) + const uint8_t *buf, uint32_t row_offset, uint32_t nb) { int res; struct samd_info *chip = (struct samd_info *)bank->driver_priv; @@ -453,7 +453,7 @@ static int samd_write_row_partial(struct flash_bank *bank, uint32_t address, return res; } -static int samd_write(struct flash_bank *bank, uint8_t *buffer, +static int samd_write(struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) { int res;