You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we're returning PICO_ERROR_GENERIC for an i2c abort such as
"No ack". Add a new PICO_ERROR_ABORT and use this if
PICO_I2C_RETURN_ABORT_REASON is true.
The abort reason comes from tx_abrt_source
(I2C_IC_TX_ABRT_SOURCE_ABRT_*_BITS) so take the zero count from
PICO_ERROR_ABORT, so the reason can be determined from the return code.
Fixes#1049
// PICO_CONFIG: PICO_I2C_RETURN_ABORT_REASON, change i2c functions to return the abort reason via a return code less than or equal to PICO_ERROR_ABORT, type=bool, default=0, group=harware_i2c
134
+
#ifPICO_I2C_RETURN_ABORT_REASON
135
+
// if (ret <= PICO_ERROR_ABORT) abort_reason = PICO_ERROR_ABORT - ret; // one of I2C_IC_TX_ABRT_SOURCE_ABRT_*_LSB
0 commit comments