mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-08-07 02:47:33 +00:00
added initial flash wrapper implementation
This commit is contained in:
32
include/sta/devices/stm32/flash.hpp
Normal file
32
include/sta/devices/stm32/flash.hpp
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* flash.hpp
|
||||
*
|
||||
* Created on: Jan 24, 2024
|
||||
* Author: Lars Wilko Sentse
|
||||
*/
|
||||
|
||||
#ifndef STA_CORE_FLASH_HPP
|
||||
#define STA_CORE_FLASH_HPP
|
||||
|
||||
#include <limits>
|
||||
|
||||
// Only enable module on STM32 platform w/ HAL GPIO module enabled
|
||||
#include <sta/config.hpp>
|
||||
#ifdef STA_PLATFORM_STM32
|
||||
# include <sta/devices/stm32/hal.hpp>
|
||||
#endif // STA_PLATFORM_STM32
|
||||
#include <sta/debug/debug.hpp>
|
||||
|
||||
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
|
Reference in New Issue
Block a user