A newer version of this document is available. Customers should click here to go to the newest version.
Visible to Intel only — GUID: qjc1642662335081
Ixiasoft
Visible to Intel only — GUID: qjc1642662335081
Ixiasoft
6.11.6. Use the Minimal Character-Mode API
- alt_printf(): This function is similar to printf(), but supports only the %c %s, %x, and %% substitution strings. alt_printf() takes up substantially less code space than printf(), regardless whether you select the lightweight device driver API. alt_printf() occupies less than 1 KB with compiler optimization level -O2.
- alt_putchar(): Equivalent to putchar().
- alt_putstr(): Similar to puts(), except that it does not append a newline character to the string.
- alt_getchar(): Equivalent to getchar().
These functions are appropriate if your program only needs to accept command strings and send simple text messages.
To use the minimal character-mode API, include the header file sys/alt_stdio.h.
The following sections outline the effects of the functions on code footprint.
For more information about the minimal character-mode functions, refer to the HAL API Reference chapter.