AT25040B Driver 0.1.0
API reference
Loading...
Searching...
No Matches
Public Attributes | List of all members
at25040b::Config Struct Reference

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...

#include <at25040b_types.hpp>

Public Attributes

Variant variant {Variant::At25040b}
 
bool check_write_enable {true}
 
uint32_t write_timeout_us {2 * kWriteCycleMaxUs}
 Longest wait for a write cycle to end, in microseconds; at least kWriteCycleMaxUs.
 

Detailed Description

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().

Config{} is an AT25040B with WP driven by the port or tied high and the start-up identity check on. The read and write verification is not configured here: each Read() and Write() call chooses it (Verify).

Member Data Documentation

◆ check_write_enable

bool at25040b::Config::check_write_enable {true}

Identity check at start-up: set and clear the write enable latch (WREN, RDSR, WRDI, RDSR) and demand that WEN follows. Nothing is programmed. On by default because it runs once, in EnsureInitialized(), and never on the Read() and Write() path, and it is what tells a dead bus (MISO stuck low reads 0x00 like an idle chip) from a chip. Turn it off only for a board whose WP pin is tied low (read-only use): the check then reads the first kIdentityReadBytes twice instead, which a dead bus with MISO stuck low still passes.

◆ variant

Variant at25040b::Config::variant {Variant::At25040b}

The fitted part; every address is checked against it.


The documentation for this struct was generated from the following file: