Nios® II Software Developer Handbook

ID 683525
Date 8/28/2023
Public
Document Table of Contents

7.13.7. Use the Minimal Character-Mode API

If you can limit your use of character-mode I/O to very simple features, you can reduce code footprint by using the minimal character-mode API. This API includes the following functions:
  • alt_printf()
  • alt_putchar()
  • alt_putstr()
  • alt_getchar()

These functions are appropriate if your program only needs to accept command strings and send simple text messages. Some of them are helpful only in conjunction with the lightweight device driver API.

For more information, refer to the “Use the Lightweight Device Driver API” chapter.

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.