Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // receive byte from uart
- static inline char uart_recv_byte()
- {
- for(;;) {
- uint8_t lsr = CT_UART.LSR;
- if( lsr & 0x1e )
- abort(); // receive-error occurred
- if( lsr & 0x01 )
- return (char) CT_UART.RBR;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment