1#ifndef genericdumbdisplay_h
2#define genericdumbdisplay_h
5 #error Before #include, must define the macro DD_SERIAL and optional DD_SERIAL_begin (a function call or a code block) \
7 e.g. STM32F103: PA3 (RX2) ==> TX; PA2 (TX2) ==> RX \
8 #define DD_SERIAL Serial2 \
11 UART Serial2(8, 9, 0, 0);
15#include "dumbdisplay.h"
37 DDGenericIO(
bool enableSerial =
false,
unsigned long serialBaud = DD_SERIAL_BAUD):
DDInputOutput(serialBaud, enableSerial, enableSerial) {
39 const char* getWhat() {
43 return DD_SERIAL.available();
46 return DD_SERIAL.read();
48 void print(
const String &s) {
51 void print(
const char *p) {
54 void write(uint8_t b) {
57 void write(
const uint8_t *buf,
size_t size) {
58 DD_SERIAL.write(buf, size);
60 bool preConnect(
bool firstCall) {
61 DDInputOutput::preConnect(firstCall);
63#if defined(DD_SERIAL_begin)
66 DD_SERIAL.begin(115200);
Definition: genericdumbdisplay.h:35