mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-19 05:40:38 +01:00
16 lines
357 B
C++
16 lines
357 B
C++
#include <ion/log.h>
|
|
#include "regs/itm.h"
|
|
|
|
// We're printing using SWO.
|
|
// This is achieved by writing to the ITM register, which is sent through the
|
|
// Cortex Debug bus
|
|
|
|
void Ion::Log::print(const char * message) {
|
|
char character = 0;
|
|
while ((character = *message++) != 0) {
|
|
if (ITM.TER()->get(0)) {
|
|
ITM.STIM(0)->set(character);
|
|
}
|
|
}
|
|
}
|