Keil Logo

Tailoring the microlib input/output functions

2.8 Tailoring the microlib input/output functions

Microlib provides a limited stdio subsystem. To use high-level I/O functions you must reimplement the base I/O functions.

Microlib provides a limited stdio subsystem that supports unbuffered stdin, stdout and stderr only. This enables you to use printf() for displaying diagnostic messages from your application.
To use high-level I/O functions you must provide your own implementation of the following base functions so that they work with your own I/O device.
fputc()
Implement this base function for all output functions. For example, fprintf(), printf(), fwrite(), fputs(), puts(), putc() and putchar().
fgetc()
Implement this base function for all input functions. For example, fscanf(), scanf(), fread(), read(), fgets(), gets(), getc() and getchar().
__backspace()
Implement this base function if your input functions use scanf() or fscanf().

Note

Conversions that are not supported in microlib are %lc, %ls and %a.
Non-ConfidentialPDF file icon PDF versionARM DUI0378H
Copyright © 2007, 2008, 2011, 2012, 2014-2016 ARM. All rights reserved. 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.