Revision 272 trunk/cardbox/cardreader.h
| cardreader.h (revision 272) | ||
|---|---|---|
| 7 | 7 |
#include "main.h" |
| 8 | 8 |
#include "rs485_int.h" |
| 9 | 9 |
|
| 10 |
#define CR_ERR_BAD_PARITY -1 |
|
| 11 |
#define CR_ERR_NO_START -2 |
|
| 12 |
#define CR_ERR_NO_STOP -3 |
|
| 13 |
|
|
| 10 | 14 |
typedef enum {
|
| 11 | 15 |
CR_NONE, |
| 12 | 16 |
CR_GOOD, |
| 13 | 17 |
CR_BAD |
| 14 | 18 |
} cr_flag_t; |
| 15 | 19 |
|
| 16 |
typedef enum {
|
|
| 17 |
CR_IDLE, |
|
| 18 |
CR_SS, |
|
| 19 |
CR_DATA |
|
| 20 |
} cr_state_t; |
|
| 21 |
|
|
| 22 | 20 |
extern volatile cr_flag_t cr_flag; |
| 23 | 21 |
extern volatile uint8_t read_card; |
| 24 | 22 |
extern volatile uint8_t cr_buf[512]; |
Also available in: Unified diff