CRTP adapter mapping BaseI2c primitives to se050::I2cTransceiveInterface.
More...
#include <Se050Handler.h>
|
| | HalI2cSe050Comm (BaseI2c &i2c, BaseGpio *reset_gpio) noexcept |
| | Construct the CRTP I²C adapter.
|
| |
| bool | EnsureInitialized () noexcept |
| |
| se050::Error | I2cWrite (const std::uint8_t *tx, std::size_t tx_len, std::uint32_t timeout_ms) noexcept |
| | Write bytes on I²C.
|
| |
| se050::Error | I2cRead (std::uint8_t *rx, std::size_t rx_len, std::uint32_t timeout_ms) noexcept |
| | Read bytes on I²C.
|
| |
| se050::Error | Transceive (const std::uint8_t *tx, std::size_t tx_len, std::uint8_t *rx, std::size_t rx_cap, std::size_t *rx_len_out, std::uint32_t timeout_ms) noexcept |
| | Combined write-then-read (T=1oI2C frame).
|
| |
| se050::Error | HardwareReset () noexcept |
| |
| void | delay_ms_impl (std::uint32_t ms) noexcept |
| |
| bool | HoldBus (std::uint32_t timeout_ms) noexcept |
| | Hold the I²C bus across a T=1 APDU (Write/Read pairs). Nested I2cWrite/Read skip lock.
|
| |
| void | ReleaseBus () noexcept |
| |
| bool | BusHeld () const noexcept |
| |
CRTP adapter mapping BaseI2c primitives to se050::I2cTransceiveInterface.
- Reset GPIO
- When
reset_gpio is non-null, HardwareReset() asserts reset with **SetInactive()**, waits 2 ms, then releases with **SetActive()** and waits 10 ms (same cadence as the ESP-IDF reference transport). Configure **BaseGpio** polarity so this sequence matches your SE_RESET wiring (typical nRESET: assert = drive low = logical inactive on an active-high GPIO).
◆ HalI2cSe050Comm()
| HalI2cSe050Comm::HalI2cSe050Comm |
( |
BaseI2c & |
i2c, |
|
|
BaseGpio * |
reset_gpio |
|
) |
| |
|
inlinenoexcept |
Construct the CRTP I²C adapter.
- Parameters
-
| i2c | Host I²C device (typically 7-bit address 0x48). |
| reset_gpio | Optional SE_RESET line; nullptr if unused. |
◆ BusHeld()
| bool HalI2cSe050Comm::BusHeld |
( |
| ) |
const |
|
inlinenoexcept |
◆ delay_ms_impl()
| void HalI2cSe050Comm::delay_ms_impl |
( |
std::uint32_t |
ms | ) |
|
|
noexcept |
◆ EnsureInitialized()
| bool HalI2cSe050Comm::EnsureInitialized |
( |
| ) |
|
|
inlinenoexcept |
◆ HardwareReset()
| se050::Error HalI2cSe050Comm::HardwareReset |
( |
| ) |
|
|
noexcept |
◆ HoldBus()
| bool HalI2cSe050Comm::HoldBus |
( |
std::uint32_t |
timeout_ms | ) |
|
|
noexcept |
Hold the I²C bus across a T=1 APDU (Write/Read pairs). Nested I2cWrite/Read skip lock.
- Parameters
-
| timeout_ms | How long to wait for the bus lock. |
◆ I2cRead()
| se050::Error HalI2cSe050Comm::I2cRead |
( |
std::uint8_t * |
rx, |
|
|
std::size_t |
rx_len, |
|
|
std::uint32_t |
timeout_ms |
|
) |
| |
|
noexcept |
Read bytes on I²C.
- Parameters
-
| rx | Receive buffer. |
| rx_len | Byte count to read. |
| timeout_ms | Transfer deadline. |
◆ I2cWrite()
| se050::Error HalI2cSe050Comm::I2cWrite |
( |
const std::uint8_t * |
tx, |
|
|
std::size_t |
tx_len, |
|
|
std::uint32_t |
timeout_ms |
|
) |
| |
|
noexcept |
Write bytes on I²C.
- Parameters
-
| tx | Transmit payload. |
| tx_len | Byte count. |
| timeout_ms | Transfer deadline. |
◆ ReleaseBus()
| void HalI2cSe050Comm::ReleaseBus |
( |
| ) |
|
|
noexcept |
◆ Transceive()
| se050::Error HalI2cSe050Comm::Transceive |
( |
const std::uint8_t * |
tx, |
|
|
std::size_t |
tx_len, |
|
|
std::uint8_t * |
rx, |
|
|
std::size_t |
rx_cap, |
|
|
std::size_t * |
rx_len_out, |
|
|
std::uint32_t |
timeout_ms |
|
) |
| |
|
noexcept |
Combined write-then-read (T=1oI2C frame).
- Parameters
-
| tx | Transmit payload. |
| tx_len | Transmit length. |
| rx | Receive buffer. |
| rx_cap | Receive capacity. |
| rx_len_out | Actual bytes received. |
| timeout_ms | Transfer deadline. |
◆ bus_held_
| bool HalI2cSe050Comm::bus_held_ {false} |
|
private |
◆ i2c_
| BaseI2c& HalI2cSe050Comm::i2c_ |
|
private |
◆ reset_gpio_
| BaseGpio* HalI2cSe050Comm::reset_gpio_ |
|
private |
The documentation for this class was generated from the following files: