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

View File

@@ -278,7 +278,7 @@ static const uint8_t kinetis_flash_write_code[] = {
};
/* Program LongWord Block Write */
static int kinetis_write_block(struct flash_bank *bank, uint8_t *buffer,
static int kinetis_write_block(struct flash_bank *bank, const uint8_t *buffer,
uint32_t offset, uint32_t wcount)
{
struct target *target = bank->target;
@@ -586,7 +586,7 @@ static int kinetis_erase(struct flash_bank *bank, int first, int last)
return ERROR_OK;
}
static int kinetis_write(struct flash_bank *bank, uint8_t *buffer,
static int kinetis_write(struct flash_bank *bank, const uint8_t *buffer,
uint32_t offset, uint32_t count)
{
unsigned int i, result, fallback = 0;