|
AT25040B Driver 0.1.0
API reference
|
Instruction opcodes and status register bits of the AT25010B, AT25020B and AT25040B. More...
Go to the source code of this file.
Namespaces | |
| namespace | at25040b |
The AT25040B driver: everything it declares lives here; internals in detail. | |
| namespace | at25040b::reg |
Opcodes and bit masks of the chip, as constexpr values. | |
Typedefs | |
| using | at25040b::reg::StatusBp = detail::Field< uint8_t, kStatusBpShift, 2U > |
| BP1:BP0 as a field of the status byte (Table 6-4): two bits from bit 2. | |
Functions | |
| constexpr bool | at25040b::reg::IsIdleStatus (uint8_t status) noexcept |
True for a status byte an idle chip can return: bits 7 to 4 clear and RDY clear (Table 6-3). A busy chip returns kStatusBusyByte instead; anything else is not a status. | |
Variables | |
| constexpr uint8_t | at25040b::reg::kWren = 0x06 |
| WREN: set the write enable latch. | |
| constexpr uint8_t | at25040b::reg::kWrdi = 0x04 |
| WRDI: reset the write enable latch. | |
| constexpr uint8_t | at25040b::reg::kRdsr = 0x05 |
| RDSR: read the status register. | |
| constexpr uint8_t | at25040b::reg::kWrsr = 0x01 |
| WRSR: write the status register (BP1, BP0). | |
| constexpr uint8_t | at25040b::reg::kRead = 0x03 |
| READ: read data from the array. | |
| constexpr uint8_t | at25040b::reg::kWrite = 0x02 |
| WRITE: write data to the array. | |
| constexpr uint8_t | at25040b::reg::kOpcodeA8 = 0x08 |
| Bit of a READ or WRITE opcode that carries address bit A8 (AT25040B only, Table 6-1 note 1). | |
| constexpr uint16_t | at25040b::reg::kAddressA8 = 0x100 |
| Address bit that goes into the opcode instead of the address byte. | |
| constexpr uint16_t | at25040b::reg::kAddressLowMask = 0xFF |
| Address bits A7 to A0: the address byte of READ and WRITE (Figures 7-6 and 7-7). | |
| constexpr uint16_t | at25040b::reg::kAddressMax = 0x1FF |
| The highest address any part of the family decodes (A8 to A0, AT25040B). | |
| constexpr uint8_t | at25040b::reg::kStatusRdy = 0x01 |
| RDY: 1 while a write cycle runs. | |
| constexpr uint8_t | at25040b::reg::kStatusWen = 0x02 |
| WEN: 1 when the write enable latch is set. | |
| constexpr uint8_t | at25040b::reg::kStatusBp0 = 0x04 |
| BP0: block protection, low bit. | |
| constexpr uint8_t | at25040b::reg::kStatusBp1 = 0x08 |
| BP1: block protection, high bit. | |
| constexpr uint8_t | at25040b::reg::kStatusBpMask = 0x0C |
| BP1 and BP0 together. | |
| constexpr uint8_t | at25040b::reg::kStatusBpShift = 2 |
| Position of BP0. | |
| constexpr uint8_t | at25040b::reg::kStatusUnused = 0xF0 |
| Bits 7 to 4: 0 when no write cycle runs. | |
| constexpr uint8_t | at25040b::reg::kStatusBusyByte = 0xFF |
| Every bit reads 1 during a write cycle. | |
Instruction opcodes and status register bits of the AT25010B, AT25020B and AT25040B.
Section and table numbers refer to the AT25010B/020B/040B datasheet, Atmel-8707F (01/2015). The chip has one register, the status register; everything else is the memory array.