Fork of MODSERIAL that works with LPC4088
Fork of MODSERIAL by
Diff: MACROS.h
- Revision:
- 8:775f860e94d3
- Parent:
- 0:eb2522b41db8
- Child:
- 12:8c7394e2ae7f
diff -r ffa4a7cb7f8d -r 775f860e94d3 MACROS.h --- a/MACROS.h Mon Nov 22 09:19:50 2010 +0000 +++ b/MACROS.h Mon Nov 22 09:58:34 2010 +0000 @@ -38,6 +38,15 @@ #define MODSERIAL_FDR 0x28 #define MODSERIAL_TER 0x30 +#define MODSERIAL_LSR_RDR (1UL << 0) +#define MODSERIAL_LSR_OE (1UL << 1) +#define MODSERIAL_LSR_PE (1UL << 2) +#define MODSERIAL_LSR_FE (1UL << 3) +#define MODSERIAL_LSR_BR (1UL << 4) +#define MODSERIAL_LSR_THRE (1UL << 5) +#define MODSERIAL_LSR_TEMT (1UL << 6) +#define MODSERIAL_LSR_RXFE (1UL << 7) + #define MODSERIAL_FIFO_ENABLE 1 #define MODSERIAL_FIFO_RX_RESET 2 #define MODSERIAL_FIFO_TX_RESET 4 @@ -54,8 +63,8 @@ #define MODSERIAL_TX_BUFFER_FULL (buffer_count[TxIrq]==buffer_size[TxIrq]) #define MODSERIAL_RX_BUFFER_FULL (buffer_count[RxIrq]==buffer_size[RxIrq]) -#define MODSERIAL_THR_HAS_SPACE (int)_LSR&(1UL<<5) -#define MODSERIAL_TEMT_IS_EMPTY (int)_LSR&(1UL<<6) -#define MODSERIAL_RBR_HAS_DATA (int)_LSR&0x1 +#define MODSERIAL_THR_HAS_SPACE (int)_LSR&MODSERIAL_LSR_THRE +#define MODSERIAL_TEMT_IS_EMPTY (int)_LSR&MODSERIAL_LSR_TEMT +#define MODSERIAL_RBR_HAS_DATA (int)_LSR&MODSERIAL_LSR_RDR #endif