phone.c: Replace defines with enum

This commit is contained in:
Christina Quast
2015-04-07 21:15:12 +02:00
parent 4396fee97e
commit 90393b3392

View File

@@ -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;