98 template<
typename OSTREAM> OSTREAM& operator<<(OSTREAM& out,
Status s)
107 out <<
F(
"START_TRANSMITTED");
111 out <<
F(
"REPEAT_START_TRANSMITTED");
115 out <<
F(
"SLA_W_TRANSMITTED_ACK");
119 out <<
F(
"SLA_W_TRANSMITTED_NACK");
123 out <<
F(
"DATA_TRANSMITTED_ACK");
127 out <<
F(
"DATA_TRANSMITTED_NACK");
131 out <<
F(
"ARBITRATION_LOST");
135 out <<
F(
"SLA_R_TRANSMITTED_ACK");
139 out <<
F(
"SLA_R_TRANSMITTED_NACK");
143 out <<
F(
"DATA_RECEIVED_ACK");
147 out <<
F(
"DATA_RECEIVED_NACK");
151 out <<
F(
"UNKNOWN[");
153 out << uint8_t(s) <<
']';
static constexpr fmtflags basefield
Bitmask constant used with setf(fmtflags, fmtflags) when changing the output base format.
static constexpr fmtflags hex
Read or write integral values using hexadecimal (0..9,A..F) base format.
#define F(ptr)
Force string constant to be stored as flash storage.
C++-like std::iostream facilities.
Define API to define and manage I2C devices.
I2CMode
I2C available transmission modes.
@ STANDARD
I2C Standard mode, less than 100KHz.
@ FAST
I2C Fast mode, less than 400KHz.
Status
Transmission status codes.
@ START_TRANSMITTED
[Transmitter/Receiver modes] A START condition has been transmitted.
@ ARBITRATION_LOST
[Transmitter mode] Abitration lost in SLA+W or data bytes.
@ REPEAT_START_TRANSMITTED
[Transmitter/Receiver modes] A repeated START condition has been transmitted.
@ DATA_TRANSMITTED_ACK
[Transmitter mode] Data byte has been transmitted; ACK has been received.
@ SLA_W_TRANSMITTED_ACK
[Transmitter mode] SLA+W has been transmitted; ACK has been received.
@ DATA_TRANSMITTED_NACK
[Transmitter mode] Data byte has been transmitted; NOT ACK has been received.
@ DATA_RECEIVED_ACK
[Receiver mode] Data byte has been transmitted; ACK has been returned.
@ SLA_W_TRANSMITTED_NACK
[Transmitter mode] SLA+W has been transmitted; NOT ACK has been received.
@ DATA_RECEIVED_NACK
[Receiver mode] Data byte has been transmitted; NOT ACK has been returned.
@ SLA_R_TRANSMITTED_NACK
[Receiver mode] SLA+R has been transmitted; NOT ACK has been received.
@ SLA_R_TRANSMITTED_ACK
[Receiver mode] SLA+R has been transmitted; ACK has been received.
@ OK
Code indicating the last called method executed as expected without any issue.