URL
https://opencores.org/ocsvn/neorv32/neorv32/trunk
[/] [neorv32/] [trunk/] [sw/] [lib/] [source/] [neorv32_uart.c] - Diff between revs 22 and 23
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 22 |
Rev 23 |
Line 123... |
Line 123... |
|
|
UART_CT &= ~((uint32_t)(1 << UART_CT_EN));
|
UART_CT &= ~((uint32_t)(1 << UART_CT_EN));
|
}
|
}
|
|
|
|
|
|
|
/**********************************************************************//**
|
/**********************************************************************//**
|
* Send single char via UART.
|
* Send single char via UART.
|
*
|
*
|
* @note This function is blocking.
|
* @note This function is blocking.
|
* @warning The 'DEVNULL_UART_OVERRIDE' compiler user flag will forward all UART TX data to the DEVNULL simulation console output.
|
* @warning The 'DEVNULL_UART_OVERRIDE' compiler user flag will forward all UART TX data to the DEVNULL simulation console output.
|
Line 147... |
Line 146... |
|
|
}
|
}
|
|
|
|
|
/**********************************************************************//**
|
/**********************************************************************//**
|
|
* Check if UART TX is busy.
|
|
*
|
|
* @note This function is blocking.
|
|
*
|
|
* @return 0 if idle, 1 if busy
|
|
**************************************************************************/
|
|
int neorv32_uart_tx_busy(void) {
|
|
|
|
if ((UART_CT & (1<<UART_CT_TX_BUSY)) != 0) {
|
|
return 1;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
|
|
/**********************************************************************//**
|
* Get char from UART.
|
* Get char from UART.
|
*
|
*
|
* @note This function is blocking.
|
* @note This function is blocking.
|
*
|
*
|
* @return Received char.
|
* @return Received char.
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.