iso7816_fsm: Handle WTIME expiry during ATR reception
There are some cards that state a wrong length of the historical
bytes in their ATR header, resulting in WTIME expiry. Let's dispatch
ISO7816_E_WTIME_EXP into the ATR FSM and treat it as normal ATR_DONE if
it happens during rx of historical bytes or TCK.
Also introdcue an ISO7816_E_ATR_ERR_IND for those situations where
waiting time expiration occurs during reception of TS/T0/TA/TB/TC/TD
bytes.
Change-Id: I62d47cb5e06b480941c67122f3c7d7a462ea2099
diff --git a/ccid_common/iso7816_fsm.h b/ccid_common/iso7816_fsm.h
index 9a6b24e..f2c7483 100644
--- a/ccid_common/iso7816_fsm.h
+++ b/ccid_common/iso7816_fsm.h
@@ -27,6 +27,7 @@
/* internal events between FSMs in this file */
ISO7816_E_ATR_DONE_IND, /*!< ATR Done indication from ATR child FSM */
+ ISO7816_E_ATR_ERR_IND, /*!< ATR Error indication from ATR child FSM */
ISO7816_E_TPDU_DONE_IND, /*!< TPDU Done indication from TPDU child FSM */
ISO7816_E_TPDU_CLEAR_REQ, /*!< Return TPDU FSM to TPDU_S_INIT */
};