Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void send_char(int ch){
- int status = *(uart_1 + 2); /* read status from 0x888 */
- int txready = 0; /* initiallize TxReady as 0 */
- /* Blocking I/0 */
- while(!txready){ /* loop until TxReady = 1 */
- txready = status & UART1_TRANSM_BIT;
- }
- /* When this is reached, TxReady = 1 */
- *(uart_1 + 1) = ch & 0xff; /* send the lowest byte */
- return; /* and then return! */
- }
Add Comment
Please, Sign In to add comment