arduino-spybug/spybug/io.hh

15 lines
577 B
C++
Raw Normal View History

2022-04-19 16:48:43 +02:00
// Copyright 2022 Darwin Schuppan <darwin@nobrain.org>
// SPDX license identifier: MIT
2022-04-19 16:44:54 +02:00
#pragma once
#include <Arduino.h>
void io_setup();
2022-04-19 19:30:15 +02:00
#define print_special(x) { Serial.print(x); }
#define die(fmt, ...) { disable_recording_interrupts(); if (settings.serial_log) { printf(F("Fatal: ")); printf(fmt, ##__VA_ARGS__); Serial.flush(); } while(1); }
#define dbg(fmt, ...) { printf(F("Debug: ")); printf(fmt, ##__VA_ARGS__); }
#define info(fmt, ...) { if (settings.serial_log) printf(fmt, ##__VA_ARGS__); }
#define info_special(x) { if (settings.serial_log) Serial.print(x); }