Commented out the body of bool MODSERIAL::claim (FILE *stream) since it causes problems with the latest mbed library
Dependents: ATT_Cellular_IOT_Button Avnet_ATT_Cellular_Pubnub Hiking_Pal Avnet_ATT_Cellular_IOT ... more
Fork of MODSERIAL by
Device/MODSERIAL_PAC_F401RB.h@42:ae4c4f174d1f, 2016-08-01 (annotated)
- Committer:
- stefanrousseau
- Date:
- Mon Aug 01 23:30:57 2016 +0000
- Revision:
- 42:ae4c4f174d1f
- Parent:
- 41:d8422efe4761
Commented out ; bool MODSERIAL::claim (FILE *stream); because it gives errors with the latest mbed library
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Gary Servin |
41:d8422efe4761 | 1 | #if defined(TARGET_PAC_F401RB) |
Gary Servin |
41:d8422efe4761 | 2 | |
Gary Servin |
41:d8422efe4761 | 3 | #define MODSERIAL_IRQ_REG ((USART_TypeDef*)_base)->CR1 |
Gary Servin |
41:d8422efe4761 | 4 | #define DISABLE_TX_IRQ MODSERIAL_IRQ_REG &= ~USART_CR1_TXEIE |
Gary Servin |
41:d8422efe4761 | 5 | #define DISABLE_RX_IRQ MODSERIAL_IRQ_REG &= ~USART_CR1_RXNEIE |
Gary Servin |
41:d8422efe4761 | 6 | #define ENABLE_TX_IRQ MODSERIAL_IRQ_REG |= USART_CR1_TXEIE |
Gary Servin |
41:d8422efe4761 | 7 | #define ENABLE_RX_IRQ MODSERIAL_IRQ_REG |= USART_CR1_RXNEIE |
Gary Servin |
41:d8422efe4761 | 8 | |
Gary Servin |
41:d8422efe4761 | 9 | #define MODSERIAL_READ_REG ((USART_TypeDef*)_base)->DR |
Gary Servin |
41:d8422efe4761 | 10 | #define MODSERIAL_WRITE_REG ((USART_TypeDef*)_base)->DR |
Gary Servin |
41:d8422efe4761 | 11 | #define MODSERIAL_READABLE ((((USART_TypeDef*)_base)->SR & USART_SR_RXNE) != 0) |
Gary Servin |
41:d8422efe4761 | 12 | #define MODSERIAL_WRITABLE ((((USART_TypeDef*)_base)->SR & USART_SR_TXE) != 0) |
Gary Servin |
41:d8422efe4761 | 13 | |
Gary Servin |
41:d8422efe4761 | 14 | #define RESET_TX_FIFO while(0 == 1) |
Gary Servin |
41:d8422efe4761 | 15 | #define RESET_RX_FIFO while(MODSERIAL_READABLE) char dummy = MODSERIAL_READ_REG |
Gary Servin |
41:d8422efe4761 | 16 | |
Gary Servin |
41:d8422efe4761 | 17 | #define RX_IRQ_ENABLED ((MODSERIAL_IRQ_REG & USART_CR1_RXNEIE) != 0) |
Gary Servin |
41:d8422efe4761 | 18 | #define TX_IRQ_ENABLED ((MODSERIAL_IRQ_REG & USART_CR1_TXEIE) != 0) |
Gary Servin |
41:d8422efe4761 | 19 | |
Gary Servin |
41:d8422efe4761 | 20 | #endif |