Kinetis SDK v.1.3 API Reference Manual
Rev. 0
Freescale Semiconductor, Inc.
|
This section describes the programming interface of the debug console driver. More...
To initialize the DbgConsole module, call the DbgConsole_Init() function and pass in the user configuration structure. This function automatically enables the module and the clock. After the DbgConsole_Init() function is called and returned, stdout and stdin are connected to the selected UART/LPUART.
Pass a user configuration debug_console_device_type_t shown here:
Debug console state is stored in debug_console_state_t structure:
This example shows how to call the DbgConsole_Init() given the user configuration structure and the instance number.
Debug console has its own printf/scanf/putchar/getchar functions which are defined in the header:
Choose toolchain's printf/scanf or the KSDK version printf/scanf:
Print out failure messages using KSDK's assert_func:
Function _doprint outputs its parameters according to a formatted string. I/O is performed by calling a given function pointer using (*func_ptr)(c,farg).
Function scan_prv converts an input line of ASCII characters based on a provided string format.
Function mknumstr converts a radix number to a string and returns its length.
Function mkfloatnumstr converts a floating radix number to a string and returns its length.