| PDL for FM0+ Version1.0 Peripheral Driverl Library for FM0+

- Main Page
- Modules
- Data Structures
- Files

Functions
Uart Pirntf Function

## Functions
void | Uart_Printf_Init (void)
| UART initialization for printf usage.
int | putchar (int ch)
| Re-target putchar function.

## Detailed Description

Provided functions of UartPrintfGroup module:

- Uart_Printf_Init()
- putchar()/fputc()

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.

## Function Documentation

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.

Here is the call graph for this function:

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.

Here is the call graph for this function: