Lazuli
Macros | Functions
stdio.h File Reference

stdio standard header file. More...

#include <Lazuli/common.h>

Go to the source code of this file.

Macros

#define EOF   ((int)-1)
 Defines the End-Of-File constant.
 

Functions

int printf (const char *format,...)
 Produce unbuffered formatted output to the serial line. More...
 
int putchar (int c)
 Transmit a single character on the serial line. More...
 
int puts (const char *s)
 Transmit the NUL-terminated string s followed by a trailing newline on the serial line, without any formatting. More...
 

Detailed Description

stdio standard header file.

This is the standard libc stdio header file for the Lazuli system.

Definition in file stdio.h.

Function Documentation

◆ printf()

int printf ( const char *  format,
  ... 
)

Produce unbuffered formatted output to the serial line.

This function is fully reentrant. No locking mechanism is provided.

Flag characters

0 The value should be zero-padded.

Field width

A decimal digit string can be used to specify a minimum field width.

Conversion specifiers

The following conversion specifiers are currently allowed:

d, i The int argument is converted to decimal.

u The unsigned int argument is converted to decimal.

% The character '' is output.

Parameters
formatThe format string.
...The variadic parameters.
Returns
The number of characters output to the serial line, or a negative value if an error occured.
Warning
The stack usage of this function is important.

Definition at line 191 of file printf.c.

◆ putchar()

int putchar ( int  c)

Transmit a single character on the serial line.

Parameters
cThe character to transmit, that will be cast to an unsigned char.
Returns
The actual value of the transmitted character, resulting from the cast, as an int.

Definition at line 40 of file usart.c.

◆ puts()

int puts ( const char *  s)

Transmit the NUL-terminated string s followed by a trailing newline on the serial line, without any formatting.

Parameters
sThe string to transmit.
Returns
A non-negative number on success, otherwise EOF on error.

Definition at line 52 of file usart.c.