mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-23 00:38:33 +03:00
phone.c: Replace defines with enum
This commit is contained in:
@@ -111,18 +111,21 @@ static const Pin pinPhoneRST = PIN_ISO7816_RST_PHONE;
|
|||||||
#define USART_SEND 0
|
#define USART_SEND 0
|
||||||
#define USART_RCV 1
|
#define USART_RCV 1
|
||||||
|
|
||||||
#define NONE 9
|
enum states{
|
||||||
#define RST_RCVD 10
|
NONE = 9,
|
||||||
#define WAIT_CMD_PHONE 11
|
RST_RCVD = 10,
|
||||||
#define WAIT_CMD_PC 12
|
WAIT_CMD_PHONE = 11,
|
||||||
#define WAIT_ATR 13
|
WAIT_CMD_PC = 12,
|
||||||
|
WAIT_ATR = 13,
|
||||||
|
};
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------
|
/*-----------------------------------------------------------------------------
|
||||||
* Internal variables
|
* Internal variables
|
||||||
*-----------------------------------------------------------------------------*/
|
*-----------------------------------------------------------------------------*/
|
||||||
/** Variable for state of send and receive froom USART */
|
/** Variable for state of send and receive froom USART */
|
||||||
static uint8_t StateUsartGlobal = USART_RCV;
|
static uint8_t StateUsartGlobal = USART_RCV;
|
||||||
|
|
||||||
static uint32_t state;
|
static enum states state;
|
||||||
extern uint8_t rcvdChar;
|
extern uint8_t rcvdChar;
|
||||||
|
|
||||||
extern volatile uint8_t timeout_occured;
|
extern volatile uint8_t timeout_occured;
|
||||||
|
|||||||
Reference in New Issue
Block a user