![]() |
PDL for FM0+
Version1.0
Peripheral Driverl Library for FM0+
|
Functions | |
void | Uart_Printf_Init (void) |
UART initialization for printf usage. | |
int | putchar (int ch) |
Re-target putchar function. |
Provided functions of UartPrintfGroup module:
To enable the pirntf via UART0 funciton, Uart_Printf_Init() must be called to initialize UART0.
In the IAR environment, putchar() will be called in printf() to output one byte via UART0. And in the Keil environment, fputc() will be called in printf() to output one byte via UART0.
int putchar | ( | int | ch | ) |
Re-target putchar function.
Definition at line 109 of file uart_printf.c.
References Mfs_Uart_GetStatus(), Mfs_Uart_SendData(), TRUE, UartCh, and UartTxEmpty.
void Uart_Printf_Init | ( | void | ) |
UART initialization for printf usage.
Definition at line 80 of file uart_printf.c.
References stc_mfs_uart_config::bEnableFifo, stc_mfs_uart_config::bHwFlow, stc_mfs_uart_config::bInvertData, stc_mfs_uart_config::enBitDirection, stc_mfs_uart_config::enDataLength, stc_mfs_uart_config::enMode, stc_mfs_uart_config::enParity, stc_mfs_uart_config::enStopBit, FALSE, InitPrintfIo, Mfs_Uart_EnableFunc(), Mfs_Uart_Init(), stc_mfs_uart_config::u32BautRate, UartCh, UartDataLsbFirst, UartEightBits, UartNormal, UartOneStopBit, UartParityNone, and UartTx.