Skip to content

struct flash_info_t

Static description of the flash device backing a flash0/flash1/... handle. More...

#include <flash.h>

Public Attributes

Name
uint32_tstartAddress
Absolute base address of the flash region.
uint32_ttotalSize
Total usable size in bytes.
uint32_twriteSize
Minimum and granularity of a single write, in bytes.
uint32_tnBanks
Number of independent banks (typically 1 or 2).
uint32_tbankSize
Size of one bank in bytes (totalSize / nBanks).
uint32_tbanksSwitchable
1 if the active bank can be switched at runtime (dual-bank devices).
uint32_tbanksSwitched
1 if the secondary bank is currently mapped as the active one.
uint32_tnSectorLayouts
Number of entries in sectorLayouts.
const flash_sector_layout_t *sectorLayouts
Ordered list of sector regions, starting at startAddress.

Detailed Description

cpp
struct flash_info_t;

Static description of the flash device backing a flash0/flash1/... handle.

Filled in by flash_info. All addresses (sector / write addresses passed to flash_erase and flash_write) are absolute and must lie within [startAddress, startAddress + totalSize).

Public Attributes Documentation

variable startAddress

cpp
uint32_t flash_info_t::startAddress

Absolute base address of the flash region.

variable totalSize

cpp
uint32_t flash_info_t::totalSize

Total usable size in bytes.

variable writeSize

cpp
uint32_t flash_info_t::writeSize

Minimum and granularity of a single write, in bytes.

variable nBanks

cpp
uint32_t flash_info_t::nBanks

Number of independent banks (typically 1 or 2).

variable bankSize

cpp
uint32_t flash_info_t::bankSize

Size of one bank in bytes (totalSize / nBanks).

variable banksSwitchable

cpp
uint32_t flash_info_t::banksSwitchable

1 if the active bank can be switched at runtime (dual-bank devices).

variable banksSwitched

cpp
uint32_t flash_info_t::banksSwitched

1 if the secondary bank is currently mapped as the active one.

variable nSectorLayouts

cpp
uint32_t flash_info_t::nSectorLayouts

Number of entries in sectorLayouts.

variable sectorLayouts

cpp
const flash_sector_layout_t* flash_info_t::sectorLayouts

Ordered list of sector regions, starting at startAddress.