ArduinoDumbDisplay v0.9.9-r34
DumbDisplay Arduino Library -- https://github.com/trevorwslee/Arduino-DumbDisplay
 
Loading...
Searching...
No Matches
DDGenericIO Class Reference

#include <genericdumbdisplay.h>

Inheritance diagram for DDGenericIO:
DDInputOutput

Public Member Functions

 DDGenericIO (bool enableSerial=false, unsigned long serialBaud=DD_SERIAL_BAUD)
 
const char * getWhat ()
 
bool available ()
 
char read ()
 
void print (const String &s)
 
void print (const char *p)
 
void write (uint8_t b)
 
void write (const uint8_t *buf, size_t size)
 
bool preConnect (bool firstCall)
 
void flush ()
 
bool canUseBuffer ()
 
- Public Member Functions inherited from DDInputOutput
 DDInputOutput (unsigned long serialBaud=DD_SERIAL_BAUD)
 
DDInputOutputnewForSerialConnection ()
 
virtual const char * getWhat ()
 
virtual bool available ()
 
virtual char read ()
 
virtual void print (const String &s)
 
virtual void print (const char *p)
 
virtual void write (uint8_t b)
 
virtual void write (const uint8_t *buf, size_t size)
 
virtual void flush ()
 
virtual void keepAlive ()
 
virtual void validConnection ()
 
virtual bool preConnect (bool firstCall)
 
virtual bool canConnectPassive ()
 
virtual bool canUseBuffer ()
 
bool isSerial ()
 
bool isForSerial ()
 
bool isBackupBySerial ()
 
bool willUseSerial ()
 

Additional Inherited Members

- Protected Member Functions inherited from DDInputOutput
 DDInputOutput (unsigned long serialBaud, bool backupBySerial, bool setupForSerial)
 
- Protected Attributes inherited from DDInputOutput
unsigned long serialBaud
 
bool backupBySerial
 
bool setupForSerial
 

Detailed Description

Subclass of DDInputOutput
IMPORTANT:

  • Before #include, must define DD_SERIAL
  • and optionally define DD_SERIAL_begin if necessary
  • DD_SERIAL_begin is a function call or a code block
  • if DD_SERIAL_begin not defined, will call DD_SERIAL.begin(115200) instead
  • e.g. SoftwareSerial – 2 => TX; 3 => RX
    #include <SoftwareSerial.h>
    SoftwareSerial ss(2, 3);
    #define DD_SERIAL ss
  • e.g. Pico – 8: PICO_TX; 9: PICO_RX
    UART uart(8, 9, 0, 0);
    #define DD_SERIAL uart
  • e.g. Arduino Mega – 17 ==> TX; 16 ==> RX
    #define DD_SERIAL Serial2
  • e.g. STM32F103 – PA3 (RX2) ==> TX; PA2 (TX2) ==> RX
    HardwareSerial hs(USART2);
    #define DD_SERIAL hs

Member Function Documentation

◆ available()

bool DDGenericIO::available ( )
inlinevirtual

Reimplemented from DDInputOutput.

◆ canUseBuffer()

bool DDGenericIO::canUseBuffer ( )
inlinevirtual

Reimplemented from DDInputOutput.

◆ flush()

void DDGenericIO::flush ( )
inlinevirtual

Reimplemented from DDInputOutput.

◆ getWhat()

const char * DDGenericIO::getWhat ( )
inlinevirtual

Reimplemented from DDInputOutput.

◆ preConnect()

bool DDGenericIO::preConnect ( bool  firstCall)
inlinevirtual

Reimplemented from DDInputOutput.

◆ print() [1/2]

void DDGenericIO::print ( const char *  p)
inlinevirtual

Reimplemented from DDInputOutput.

◆ print() [2/2]

void DDGenericIO::print ( const String &  s)
inlinevirtual

Reimplemented from DDInputOutput.

◆ read()

char DDGenericIO::read ( )
inlinevirtual

Reimplemented from DDInputOutput.

◆ write() [1/2]

void DDGenericIO::write ( const uint8_t *  buf,
size_t  size 
)
inlinevirtual

Reimplemented from DDInputOutput.

◆ write() [2/2]

void DDGenericIO::write ( uint8_t  b)
inlinevirtual

Reimplemented from DDInputOutput.