fremoclock  1_3A01
FREMO Clock - Software for UTG
uart.h File Reference

Minimal uart library with output only for debugging. More...

Go to the source code of this file.

Macros

#define LOG_P(FMT, ...)   printf_P(PSTR(FMT), ## __VA_ARGS__)
 Printf like macro to log to uart. More...
 
#define LOG(FMT, ...)   printf(FMT, ## __VA_ARGS__)
 Printf like macro to log to uart. More...
 

Functions

void log_init (void)
 Call once in start of main to initialize logging to uart with LOG() and LOG_P() macros. More...
 

Detailed Description

Minimal uart library with output only for debugging.

Hardware: ATmega8/48/88/168/328P.

Version
$Id: uart.h 159 2016-09-03 06:51:47Z pischky $
Author
Martin Pischky

Definition in file uart.h.

Macro Definition Documentation

#define LOG (   FMT,
  ... 
)    printf(FMT, ## __VA_ARGS__)

Printf like macro to log to uart.

Definition at line 37 of file uart.h.

#define LOG_P (   FMT,
  ... 
)    printf_P(PSTR(FMT), ## __VA_ARGS__)

Printf like macro to log to uart.

Format string is stored in program memory. PSTR() is added by macro and at usage.

Definition at line 32 of file uart.h.

Function Documentation

void log_init ( void  )

Call once in start of main to initialize logging to uart with LOG() and LOG_P() macros.

Define SERIAL_OUT_ON to enable and set HOST_BAUD_RATE to desired baud rate in sysdef.h.