aboutsummaryrefslogtreecommitdiffstats
path: root/platforms/chibios/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'platforms/chibios/drivers')
-rw-r--r--platforms/chibios/drivers/wear_leveling/wear_leveling_rp2040_flash.c6
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));