SE050 Driver
API reference
Loading...
Searching...
No Matches
Functions | Variables
se050::t1 Namespace Reference

T=1 constants and small helpers for SE050 on I²C. More...

Functions

constexpr bool IsIBlock (std::uint8_t pcb) noexcept
 
constexpr bool IsRBlock (std::uint8_t pcb) noexcept
 
constexpr bool IsSBlock (std::uint8_t pcb) noexcept
 
constexpr bool IBlockMore (std::uint8_t pcb) noexcept
 
constexpr std::uint8_t IBlockPcb (std::uint8_t ns_bit, bool more) noexcept
 
constexpr std::uint8_t RBlockAckPcb (std::uint8_t nr_bit) noexcept
 
constexpr std::uint8_t IBlockSeqFromPcb (std::uint8_t pcb) noexcept
 
constexpr std::uint8_t RBlockNrFromPcb (std::uint8_t pcb) noexcept
 N(R) of an R-block: the sequence number of the I-block its sender expects next.
 
constexpr std::uint8_t RBlockNackPcb (std::uint8_t nr_bit, std::uint8_t err) noexcept
 R-block asking for the block with sequence number nr again, with error code err.
 

Variables

constexpr std::uint8_t kNadHostToSe = 0x5AU
 NAD value used by the host for command blocks.
 
constexpr std::uint8_t kNadSeToHost = 0xA5U
 NAD value returned by the SE in response blocks.
 
constexpr std::size_t kMaxInformationField = 254U
 Maximum information field size per block (ISO 7816-3 typical upper bound).
 
constexpr std::size_t kMaxRawBlockBytes = 3U + kMaxInformationField + 2U
 Raw block buffer high water: prologue + INF + EDC.
 
constexpr std::uint8_t kPcbSWarmReset = 0xC6U
 S-block PCB used by NXP stacks for a 7816-style warm reset request (LEN = 0 INF).
 
constexpr std::uint8_t kPcbSGetAtr = 0xC7U
 S-block PCB used by NXP stacks for GET ATR / card profile read (LEN = 0 INF).
 
constexpr std::uint8_t kPcbSResyncReq = 0xC0U
 S-block request/response pair for resynchronization.
 
constexpr std::uint8_t kPcbSResyncResp = 0xE0U
 
constexpr std::uint8_t kPcbSWtxReq = 0xC3U
 S-block request/response pair for waiting-time extension.
 
constexpr std::uint8_t kPcbSWtxResp = 0xE3U
 
constexpr std::uint8_t kRBlockErrEdc = 0x01U
 R-block error code: EDC error (ISO/IEC 7816-3 11.4.3).
 
constexpr std::uint8_t kRBlockErrOther = 0x02U
 R-block error code: other error (ISO/IEC 7816-3 11.4.3).
 
constexpr std::uint8_t kDefaultMaxRetransmissions = 3U
 Default number of times one block is sent again before an exchange fails.
 

Detailed Description

T=1 constants and small helpers for SE050 on I²C.

Function Documentation

◆ IBlockMore()

constexpr bool se050::t1::IBlockMore ( std::uint8_t  pcb)
inlineconstexprnoexcept

◆ IBlockPcb()

constexpr std::uint8_t se050::t1::IBlockPcb ( std::uint8_t  ns_bit,
bool  more 
)
inlineconstexprnoexcept

◆ IBlockSeqFromPcb()

constexpr std::uint8_t se050::t1::IBlockSeqFromPcb ( std::uint8_t  pcb)
inlineconstexprnoexcept

◆ IsIBlock()

constexpr bool se050::t1::IsIBlock ( std::uint8_t  pcb)
inlineconstexprnoexcept

◆ IsRBlock()

constexpr bool se050::t1::IsRBlock ( std::uint8_t  pcb)
inlineconstexprnoexcept

◆ IsSBlock()

constexpr bool se050::t1::IsSBlock ( std::uint8_t  pcb)
inlineconstexprnoexcept

◆ RBlockAckPcb()

constexpr std::uint8_t se050::t1::RBlockAckPcb ( std::uint8_t  nr_bit)
inlineconstexprnoexcept

◆ RBlockNackPcb()

constexpr std::uint8_t se050::t1::RBlockNackPcb ( std::uint8_t  nr_bit,
std::uint8_t  err 
)
inlineconstexprnoexcept

R-block asking for the block with sequence number nr again, with error code err.

◆ RBlockNrFromPcb()

constexpr std::uint8_t se050::t1::RBlockNrFromPcb ( std::uint8_t  pcb)
inlineconstexprnoexcept

N(R) of an R-block: the sequence number of the I-block its sender expects next.

Variable Documentation

◆ kDefaultMaxRetransmissions

constexpr std::uint8_t se050::t1::kDefaultMaxRetransmissions = 3U
inlineconstexpr

Default number of times one block is sent again before an exchange fails.

◆ kMaxInformationField

constexpr std::size_t se050::t1::kMaxInformationField = 254U
inlineconstexpr

Maximum information field size per block (ISO 7816-3 typical upper bound).

◆ kMaxRawBlockBytes

constexpr std::size_t se050::t1::kMaxRawBlockBytes = 3U + kMaxInformationField + 2U
inlineconstexpr

Raw block buffer high water: prologue + INF + EDC.

◆ kNadHostToSe

constexpr std::uint8_t se050::t1::kNadHostToSe = 0x5AU
inlineconstexpr

NAD value used by the host for command blocks.

◆ kNadSeToHost

constexpr std::uint8_t se050::t1::kNadSeToHost = 0xA5U
inlineconstexpr

NAD value returned by the SE in response blocks.

◆ kPcbSGetAtr

constexpr std::uint8_t se050::t1::kPcbSGetAtr = 0xC7U
inlineconstexpr

S-block PCB used by NXP stacks for GET ATR / card profile read (LEN = 0 INF).

◆ kPcbSResyncReq

constexpr std::uint8_t se050::t1::kPcbSResyncReq = 0xC0U
inlineconstexpr

S-block request/response pair for resynchronization.

◆ kPcbSResyncResp

constexpr std::uint8_t se050::t1::kPcbSResyncResp = 0xE0U
inlineconstexpr

◆ kPcbSWarmReset

constexpr std::uint8_t se050::t1::kPcbSWarmReset = 0xC6U
inlineconstexpr

S-block PCB used by NXP stacks for a 7816-style warm reset request (LEN = 0 INF).

◆ kPcbSWtxReq

constexpr std::uint8_t se050::t1::kPcbSWtxReq = 0xC3U
inlineconstexpr

S-block request/response pair for waiting-time extension.

◆ kPcbSWtxResp

constexpr std::uint8_t se050::t1::kPcbSWtxResp = 0xE3U
inlineconstexpr

◆ kRBlockErrEdc

constexpr std::uint8_t se050::t1::kRBlockErrEdc = 0x01U
inlineconstexpr

R-block error code: EDC error (ISO/IEC 7816-3 11.4.3).

◆ kRBlockErrOther

constexpr std::uint8_t se050::t1::kRBlockErrOther = 0x02U
inlineconstexpr

R-block error code: other error (ISO/IEC 7816-3 11.4.3).