Nios® II Software Developer Handbook

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

7.7. Using Character-Mode Devices

A character-mode device is a hardware peripheral that either or both send or receive characters serially. A common example is the UART. Character mode devices are registered as nodes in the HAL file system. In general, a program associates a file descriptor to a device’s name, and then writes and reads characters to or from the file using the ANSI C file operations defined in file.h. The HAL also supports the concept of standard input, standard output, and standard error, allowing programs to call the stdio.h I/O functions.