|
AT25040B Driver 0.1.0
API reference
|
Public types of the AT25040B driver: errors, Result<T>, variants, block protection and configuration.
More...
Go to the source code of this file.
Classes | |
| struct | at25040b::Result< T > |
| The value of a call, or why there is none. More... | |
| struct | at25040b::Result< void > |
| The result of a call that returns no value. More... | |
| struct | at25040b::Status |
| The status register, decoded (Tables 6-2 and 6-3). More... | |
| struct | at25040b::Config |
What the driver is told about the board. The chip itself has nothing to configure: its only setting, the block protection, is non-volatile and set with SetBlockProtection(). More... | |
Namespaces | |
| namespace | at25040b |
The AT25040B driver: everything it declares lives here; internals in detail. | |
Functions | |
| constexpr const char * | at25040b::ToString (Error error) noexcept |
| The name of an error, for logs. | |
| constexpr std::size_t | at25040b::CapacityBytes (Variant variant) noexcept |
| Array size of a variant. | |
| constexpr std::size_t | at25040b::ProtectedFrom (Variant variant, BlockProtect level) noexcept |
| First protected address of a protection level (Table 6-4). | |
| constexpr Error | at25040b::Validate (const Config &config) noexcept |
| Check a configuration without touching the chip. | |
| constexpr const char * | at25040b::GetDriverVersion () noexcept |
| constexpr uint32_t | at25040b::GetDriverVersionMajor () noexcept |
| constexpr uint32_t | at25040b::GetDriverVersionMinor () noexcept |
| constexpr uint32_t | at25040b::GetDriverVersionPatch () noexcept |
Variables | |
| constexpr std::size_t | at25040b::kPageSizeBytes = 8 |
| Bytes per page: a WRITE never crosses an 8-byte page (section 6, "Write Sequence"). | |
| constexpr std::size_t | at25040b::kReadChunkBytes = 16 |
Data bytes per READ transfer: Read() splits longer requests into transfers of at most this many data bytes. | |
| constexpr std::size_t | at25040b::kMaxTransferBytes = 2 + kReadChunkBytes |
Longest transfer the driver asks of the port: opcode, address byte and kReadChunkBytes. | |
| constexpr uint32_t | at25040b::kWriteCycleMaxUs = 5000 |
| Longest self-timed write cycle t_WC, in microseconds (Table 4-3, maximum, every supply). | |
| constexpr uint32_t | at25040b::kPollIntervalUs = 100 |
| Time between two status reads while the driver waits for a write cycle, in microseconds. | |
| constexpr uint32_t | at25040b::kWriteTimeoutMaxUs = 1000000 |
Longest Config::write_timeout_us the driver accepts, in microseconds (one second). | |
| constexpr std::size_t | at25040b::kIdentityReadBytes = 8 |
Bytes from address 0 that EnsureInitialized() reads twice when check_write_enable is off. | |
Public types of the AT25040B driver: errors, Result<T>, variants, block protection and configuration.
Everything here is plain data with no platform dependency, so handlers, tests and tools can include it without the driver template. Section and table numbers refer to the AT25010B/020B/040B datasheet, Atmel-8707F (01/2015).