Guest User

Untitled

a guest
Jul 19th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. void send_char(int ch){
  2. int status = *(uart_1 + 2); /* read status from 0x888 */
  3. int txready = 0; /* initiallize TxReady as 0 */
  4. /* Blocking I/0 */
  5. while(!txready){ /* loop until TxReady = 1 */
  6. txready = status & UART1_TRANSM_BIT;
  7. }
  8. /* When this is reached, TxReady = 1 */
  9. *(uart_1 + 1) = ch & 0xff; /* send the lowest byte */
  10. return; /* and then return! */
  11. }
Add Comment
Please, Sign In to add comment