diff options
| author | Pablo MartÃnez | 2025-05-22 15:31:15 +0200 |
|---|---|---|
| committer | GitHub | 2025-05-22 15:31:15 +0200 |
| commit | 955809bd5aee8b1444595b450eeeef1f42799995 (patch) | |
| tree | 08da1f696605925286f681a2b738fa5f35cd0386 /platforms/chibios/drivers | |
| parent | fa24b0fcce2c5f3330f2d798c3caf91a130babdb (diff) | |
Add `compiler_support.h` (#25274)
Diffstat (limited to 'platforms/chibios/drivers')
| -rw-r--r-- | platforms/chibios/drivers/wear_leveling/wear_leveling_rp2040_flash.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/platforms/chibios/drivers/wear_leveling/wear_leveling_rp2040_flash.c b/platforms/chibios/drivers/wear_leveling/wear_leveling_rp2040_flash.c index 9bfc68f9d2..2f3c7c58ca 100644 --- a/platforms/chibios/drivers/wear_leveling/wear_leveling_rp2040_flash.c +++ b/platforms/chibios/drivers/wear_leveling/wear_leveling_rp2040_flash.c @@ -6,13 +6,15 @@ * SPDX-License-Identifier: BSD-3-Clause */ +#include <stdbool.h> + #include "pico/bootrom.h" #include "hardware/flash.h" #include "hardware/sync.h" #include "hardware/structs/ssi.h" #include "hardware/structs/ioqspi.h" -#include <stdbool.h> +#include "compiler_support.h" #include "timer.h" #include "wear_leveling.h" #include "wear_leveling_rp2040_flash_config.h" @@ -178,7 +180,7 @@ bool backing_store_erase(void) { #endif // Ensure the backing size can be cleanly subtracted from the flash size without alignment issues. - _Static_assert((WEAR_LEVELING_BACKING_SIZE) % (FLASH_SECTOR_SIZE) == 0, "Backing size must be a multiple of FLASH_SECTOR_SIZE"); + STATIC_ASSERT((WEAR_LEVELING_BACKING_SIZE) % (FLASH_SECTOR_SIZE) == 0, "Backing size must be a multiple of FLASH_SECTOR_SIZE"); interrupts = save_and_disable_interrupts(); flash_range_erase((WEAR_LEVELING_RP2040_FLASH_BASE), (WEAR_LEVELING_BACKING_SIZE)); |