Skip to content

Commit

Permalink
drivers/mtd_flashpage: slot_aux should fail on compilation if feature…
Browse files Browse the repository at this point in the history
… is not present
  • Loading branch information
FlapKap committed Apr 8, 2024
1 parent 8bb8c5b commit 4de1fdf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/mtd_flashpage/mtd_flashpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ const mtd_desc_t mtd_flashpage_driver = {
};

#if CONFIG_SLOT_AUX_LEN
#ifndef MODULE_PERIPH_FLASHPAGE_AUX
#error "CONFIG_SLOT_AUX_LEN requires the periph_flashpage_aux feature to work"
#endif
mtd_flashpage_t mtd_flash_aux_slot = MTD_FLASHPAGE_AUX_INIT_VAL(CONFIG_SLOT_AUX_OFFSET,
CONFIG_SLOT_AUX_LEN);
MTD_XFA_ADD(mtd_flash_aux_slot, CONFIG_SLOT_AUX_MTD_OFFSET);
Expand Down

0 comments on commit 4de1fdf

Please sign in to comment.