COSA
An Object-Oriented Platform for Arduino Programming
Trace.cpp
Go to the documentation of this file.
1 
21 #include "Cosa/Trace.hh"
22 
23 Trace trace __attribute__ ((weak));
24 
26 
27 bool
29 {
30  device(dev);
31  if (banner != NULL) {
32  print(banner);
33  println();
34  }
35  return (true);
36 }
37 
38 void
39 Trace::fatal(const char* file, int line, str_P expr)
40 {
41  printf(PSTR("%s:%d:%S\r\n"), file, line, expr);
43  device()->flush();
44  exit(0);
45 }
#define LOG_UPTO(prio)
Definition: Trace.hh:106
void fatal(const char *file, int line, str_P expr)
Definition: Trace.cpp:39
void println()
Definition: IOStream.hh:467
uint8_t trace_log_mask
Definition: Trace.cpp:25
void print(int value, Base base=dec)
Definition: IOStream.cpp:46
#define NULL
Definition: Types.h:101
#define PSTR(s)
Definition: Types.h:202
void printf(str_P format,...)
Definition: IOStream.hh:487
#define LOG_INFO
Definition: Trace.hh:96
const class prog_str * str_P
Definition: Types.h:187
Definition: Trace.hh:31
virtual int flush()
char EXITCHARACTER
Definition: Trace.hh:84
Device * device() const
Definition: IOStream.hh:265
Trace trace
Definition: Trace.cpp:23
bool begin(IOStream::Device *dev, str_P banner=NULL)
Definition: Trace.cpp:28