Advertisement
Guest User

Untitled

a guest
Oct 27th, 2015
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.89 KB | None | 0 0
  1. #if !defined(USART_ISR_RXNE)
  2. #define USART_ISR_RXNE                      USART_ISR_RXNE //CHANGED
  3. #endif
  4.  
  5. /**
  6.  * @brief  Default string delimiter for USART
  7.  */
  8. #define USART_STRING_DELIMITER              '\n'
  9.  
  10. /* Configuration */
  11. #if defined(STM32F4XX)  // to change to f0
  12. #define USART_WRITE_DATA(USARTx, data)      ((USARTx)->DR = (data))
  13. #define USART_READ_DATA(USARTx)             ((USARTx)->DR)
  14. #define GPIO_AF_UART5                       (GPIO_AF8_UART5)
  15. #define USART_STATUS_REG                    SR
  16. #else
  17. #define USART_WRITE_DATA(USARTx, data)      ((USARTx)->TDR = (data))
  18. #define USART_READ_DATA(USARTx)             ((USARTx)->RDR)
  19. #define GPIO_AF_UART5                       (GPIO_AF7_UART5)
  20. #define USART_STATUS_REG                    ISR
  21. #endif
  22.  
  23.  
  24. /* Wait for TX empty */
  25. #define USART_WAIT(USARTx)                  while (!((USARTx)->USART_STATUS_REG & USART_FLAG_TXE))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement