flash: Constify write buffer
[fw/openocd] / src / flash / nor / stm32lx.c
index eb4f96ddca2eabce2ec92654e9ab484192580912..75cecce61e5c923fd8d0fed88a86fff3ea9b19f1 100644 (file)
@@ -212,7 +212,7 @@ static int stm32lx_protect(struct flash_bank *bank, int set, int first,
        return ERROR_OK;
 }
 
-static int stm32lx_write_half_pages(struct flash_bank *bank, uint8_t *buffer,
+static int stm32lx_write_half_pages(struct flash_bank *bank, const uint8_t *buffer,
                uint32_t offset, uint32_t count)
 {
        struct target *target = bank->target;
@@ -403,7 +403,7 @@ static int stm32lx_write_half_pages(struct flash_bank *bank, uint8_t *buffer,
        return retval;
 }
 
-static int stm32lx_write(struct flash_bank *bank, uint8_t *buffer,
+static int stm32lx_write(struct flash_bank *bank, const uint8_t *buffer,
                uint32_t offset, uint32_t count)
 {
        struct target *target = bank->target;