#pragma once #include "pico/flash.h" const uint16_t MAGIC_NUMBER = 2; enum class Mode : uint8_t { IAMBIC_A = 0, IAMBIC_B, }; struct Settings { uint16_t magic_number {MAGIC_NUMBER}; // Bytes: 2 Mode mode {Mode::IAMBIC_B}; // Bytes: 1 uint8_t wpm {18}; // Bytes: 1 uint8_t dummy[FLASH_PAGE_SIZE - 4] {0}; // Sum : 4 }; void store_settings(Settings &settings); Settings read_settings();