Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #if !defined(USART_ISR_RXNE)
- #define USART_ISR_RXNE USART_ISR_RXNE //CHANGED
- #endif
- /**
- * @brief Default string delimiter for USART
- */
- #define USART_STRING_DELIMITER '\n'
- /* Configuration */
- #if defined(STM32F4XX) // to change to f0
- #define USART_WRITE_DATA(USARTx, data) ((USARTx)->DR = (data))
- #define USART_READ_DATA(USARTx) ((USARTx)->DR)
- #define GPIO_AF_UART5 (GPIO_AF8_UART5)
- #define USART_STATUS_REG SR
- #else
- #define USART_WRITE_DATA(USARTx, data) ((USARTx)->TDR = (data))
- #define USART_READ_DATA(USARTx) ((USARTx)->RDR)
- #define GPIO_AF_UART5 (GPIO_AF7_UART5)
- #define USART_STATUS_REG ISR
- #endif
- /* Wait for TX empty */
- #define USART_WAIT(USARTx) while (!((USARTx)->USART_STATUS_REG & USART_FLAG_TXE))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement