Numworks Epsilon  1.4.1
Graphing Calculator Operating System
log.cpp
Go to the documentation of this file.
1 #include <ion/log.h>
2 #include "regs/itm.h"
3 
4 // We're printing using SWO.
5 // This is achieved by writing to the ITM register, which is sent through the
6 // Cortex Debug bus
7 
8 void ion_log_string(const char * message) {
9  char character = 0;
10  while ((character = *message++) != 0) {
11  if (ITM.TER()->get(0)) {
12  ITM.STIM(0)->set(character);
13  }
14  }
15 }
bool get(int index) volatile
Definition: itm.h:16
Definition: itm.h:8
Definition: itm.h:14
void set(Register< T > value) volatile
Definition: register.h:12
void ion_log_string(const char *message)
Definition: log.cpp:8
volatile STIM * STIM(int i) const
Definition: itm.h:20