URL
https://opencores.org/ocsvn/neorv32/neorv32/trunk
Subversion Repositories neorv32
Compare Revisions
- This comparison shows the changes necessary to convert path
/neorv32/trunk/sw/lib
- from Rev 2 to Rev 3
- ↔ Reverse comparison
Rev 2 → Rev 3
/include/neorv32.h
144,7 → 144,8
CPU_MFEATURES_IO_PWM = 21, /**< CPU mfeatures CSR (21) (r/-): Pulse-width modulation unit implemented when 1 (via IO_PWM_USE generic) */ |
CPU_MFEATURES_IO_WDT = 22, /**< CPU mfeatures CSR (22) (r/-): Watchdog timer implemented when 1 (via IO_WDT_USE generic) */ |
CPU_MFEATURES_IO_CLIC = 23, /**< CPU mfeatures CSR (23) (r/-): Core-local interrupt controller implemented when 1 (via IO_CLIC_USE generic) */ |
CPU_MFEATURES_IO_TRNG = 24 /**< CPU mfeatures CSR (24) (r/-): True random number generator implemented when 1 (via IO_TRNG_USE generic) */ |
CPU_MFEATURES_IO_TRNG = 24, /**< CPU mfeatures CSR (24) (r/-): True random number generator implemented when 1 (via IO_TRNG_USE generic) */ |
CPU_MFEATURES_IO_DEVNULL = 25 /**< CPU mfeatures CSR (24) (r/-): Dummy device implemented when 1 (via IO_DEVNULL_USE generic) */ |
}; |
|
|
491,6 → 492,15
/**@}*/ |
|
|
/**********************************************************************//** |
* @name IO Device: Dummy Device (DEVNULL) |
**************************************************************************/ |
/**@{*/ |
/** TRNG data register (r/w) */ |
#define DEVNULL_DATA (*(IO_REG32 0xFFFFFFFC)) |
/**@}*/ |
|
|
// ---------------------------------------------------------------------------- |
// Include all IO driver headers |
// ---------------------------------------------------------------------------- |
/source/neorv32_uart.c
130,14 → 130,21
* Send single char via UART. |
* |
* @note This function is blocking. |
* @warning The 'SIMCOM_UART_OVERRIDE' compiler user flag will forward all UART TX data to the SIMCOM simulation console output. |
* |
* @param[in] c Char to be send. |
**************************************************************************/ |
void neorv32_uart_putc(char c) { |
|
#ifdef DEVNULL_UART_OVERRIDE |
#warning UART OVERRIDE! Sending all UART.TX data to DEVNULL simulation output instead of UART transmitter. Use this for simulations only! |
DEVNULL_DATA = (uint32_t)c; |
#else |
// wait for previous transfer to finish |
while ((UART_CT & (1<<UART_CT_TX_BUSY)) != 0); |
UART_DATA = ((uint32_t)c) << UART_DATA_LSB; |
#endif |
|
} |
|
|