Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1.  
  2. bool USART_PutChar(char c){
  3.  
  4. bool result = false;
  5.  
  6. CORE_EnterCriticalSection();
  7. result = RingBuffer_PutChar(&USART_RingBuffer_Tx, c);
  8. CORE_ExitCriticalSection();
  9.  
  10. if(result == true)
  11. {
  12. __USART_ENABLE_IT(&UartHandle, USART_IT_TXE);
  13. }
  14.  
  15. return result;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement