Browse Source

rp2/rp2_flash: Prevent MICROPY_HW_FLASH_STORAGE_BASE being set negative.

pull/7018/head
Andrew Scheller 4 years ago
committed by Damien George
parent
commit
b6489425c6
  1. 1
      ports/rp2/rp2_flash.c

1
ports/rp2/rp2_flash.c

@ -42,6 +42,7 @@
#define MICROPY_HW_FLASH_STORAGE_BASE (PICO_FLASH_SIZE_BYTES - MICROPY_HW_FLASH_STORAGE_BYTES)
#endif
static_assert(MICROPY_HW_FLASH_STORAGE_BYTES <= PICO_FLASH_SIZE_BYTES, "MICROPY_HW_FLASH_STORAGE_BYTES too big");
static_assert(MICROPY_HW_FLASH_STORAGE_BASE + MICROPY_HW_FLASH_STORAGE_BYTES <= PICO_FLASH_SIZE_BYTES, "MICROPY_HW_FLASH_STORAGE_BYTES too big");
typedef struct _rp2_flash_obj_t {

Loading…
Cancel
Save