|
| static void | write (uint32_t addr, const void *buf, uint32_t len) |
| | Performs write to the device.
|
| |
| static void | read (uint32_t addr, void *buf, size_t len) |
| | Reads data from the device.
|
| |
| static uint32_t | next_sector_address (uint32_t addr) |
| | Aligns an address to the next possible sector start (i.e., rounds up to sector boundary).
|
| |
| static void | erase (uint32_t addr, size_t len) |
| | Erases sector(s) of the device.
|
| |
template<uint32_t ERASE_PAGE_SIZE>
class TiFlash< ERASE_PAGE_SIZE >
Definition at line 141 of file TiFlash.hxx.
◆ TiFlash()
template<uint32_t ERASE_PAGE_SIZE>
◆ erase()
template<uint32_t ERASE_PAGE_SIZE>
| static void TiFlash< ERASE_PAGE_SIZE >::erase |
( |
uint32_t |
addr, |
|
|
size_t |
len |
|
) |
| |
|
inlinestatic |
Erases sector(s) of the device.
- Parameters
-
| addr | beginning of the sector to erase. Must be sector aligned. |
| len | how many bytes to erase (must be multiple of sector size). |
Definition at line 249 of file TiFlash.hxx.
◆ next_sector_address()
template<uint32_t ERASE_PAGE_SIZE>
| static uint32_t TiFlash< ERASE_PAGE_SIZE >::next_sector_address |
( |
uint32_t |
addr | ) |
|
|
inlinestatic |
Aligns an address to the next possible sector start (i.e., rounds up to sector boundary).
- Parameters
-
| addr | an address in the flash address space. |
- Returns
- If addr is the first byte of a sector, then returns addr unmodified. Otherwise returns the starting address of the next sector.
Definition at line 241 of file TiFlash.hxx.
◆ read()
template<uint32_t ERASE_PAGE_SIZE>
| static void TiFlash< ERASE_PAGE_SIZE >::read |
( |
uint32_t |
addr, |
|
|
void * |
buf, |
|
|
size_t |
len |
|
) |
| |
|
inlinestatic |
Reads data from the device.
- Parameters
-
| addr | where to read from (address space of the MCU) |
| buf | points to where to put the data read |
| len | how many bytes to read |
Definition at line 231 of file TiFlash.hxx.
◆ write()
template<uint32_t ERASE_PAGE_SIZE>
| static void TiFlash< ERASE_PAGE_SIZE >::write |
( |
uint32_t |
addr, |
|
|
const void * |
buf, |
|
|
uint32_t |
len |
|
) |
| |
|
inlinestatic |
Performs write to the device.
This call is synchronous; does not return until the write is complete.
- Parameters
-
| addr | where to write (in the address space of the MCU). |
| buf | data to write |
| len | how many bytes to write |
Definition at line 152 of file TiFlash.hxx.
The documentation for this class was generated from the following file: