modm API documentation
modm::platform::Flash Class Reference

Public Typedefs

using MaxWordType = uint32_t
 

Public Types

enum  WordSize : uint32_t { B8 = 0, B16 = FLASH_CR_PSIZE_0, B32 = FLASH_CR_PSIZE_1 }
 

Static Public Member Functions

static void enable ()
 
static void disable ()
 
static bool isLocked ()
 
static bool isBusy ()
 
static bool unlock ()
 
static uint8_t getSector (uint8_t *ptr)
 
static uint8_t getSector (uintptr_t offset)
 
static uint8_t getPage (uint8_t *ptr)
 
static uint8_t getPage (uintptr_t offset)
 
static uint8_t * getAddr (uint8_t sector)
 
static uint32_t getOffset (uint8_t sector)
 
static size_t getSize (uint8_t sector)
 
static uint32_t erase (uint8_t sector, WordSize size=WordSize::B32)
 
static uint32_t program (uintptr_t addr, uint8_t data)
 
static uint32_t program (uintptr_t addr, uint16_t data)
 
static uint32_t program (uintptr_t addr, MaxWordType data, WordSize size=WordSize::B32)
 

Static Public Attributes

static constexpr uintptr_t OriginAddr { 0x8000000 }
 
static constexpr size_t Size { 0x100000 }
 
static uint8_t *const Origin {(uint8_t*)OriginAddr}
 

The documentation for this class was generated from the following files: