Guest User

Untitled

a guest
Jul 25th, 2022
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. // receive byte from uart
  2. static inline char uart_recv_byte()
  3. {
  4. for(;;) {
  5. uint8_t lsr = CT_UART.LSR;
  6. if( lsr & 0x1e )
  7. abort(); // receive-error occurred
  8. if( lsr & 0x01 )
  9. return (char) CT_UART.RBR;
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment