/* * flash.hpp * * Created on: Jan 24, 2024 * Author: Lars Wilko Sentse */ #ifndef STA_CORE_FLASH_HPP #define STA_CORE_FLASH_HPP #include // Only enable module on STM32 platform w/ HAL GPIO module enabled #include #ifdef STA_PLATFORM_STM32 # include #endif // STA_PLATFORM_STM32 #include namespace sta { class Flash{ public: Flash() = delete; static uint32_t flash_write_word(uint32_t address, uint32_t data, bool erase_sector); static uint32_t flash_read_word(uint32_t address); static uint32_t flash_erase_sectors(uint32_t sector, uint32_t num_sectors); static uint32_t flash_get_sector(uint32_t address); }; }//namespace sta #endif //STA_CORE_FLASH_HPP