Paperd.Ink Library 0.0.5
Library for interacting with Paperd.Ink devices.
Loading...
Searching...
No Matches
ArudinoStreamParser Class Reference

#include <paperdink_common.h>

Inheritance diagram for ArudinoStreamParser:

Public Member Functions

size_t write (const uint8_t *buffer, size_t size) override
 
size_t write (uint8_t data) override
 
int available () override
 
int read () override
 
int peek () override
 
void flush () override
 

Detailed Description

Definition at line 22 of file paperdink_common.h.

Member Function Documentation

◆ available()

int ArudinoStreamParser::available ( )
override

Definition at line 25 of file common.cpp.

26{
27 return 1;
28}

◆ flush()

void ArudinoStreamParser::flush ( )
override

Definition at line 40 of file common.cpp.

41{
42}

◆ peek()

int ArudinoStreamParser::peek ( )
override

Definition at line 35 of file common.cpp.

36{
37 return -1;
38}

◆ read()

int ArudinoStreamParser::read ( )
override

Definition at line 30 of file common.cpp.

31{
32 return -1;
33}

◆ write() [1/2]

size_t ArudinoStreamParser::write ( const uint8_t * buffer,
size_t size )
override

Definition at line 3 of file common.cpp.

4{
5 uint8_t char_val = 0x00;
6
7 if (size && data) {
8 for (size_t idx = 0; idx < size; idx++) {
9 char_val = *(data + idx);
10 parse(char_val);
11 }
12 return size;
13 }
14
15 return 0;
16}

◆ write() [2/2]

size_t ArudinoStreamParser::write ( uint8_t data)
override

Definition at line 18 of file common.cpp.

19{
20 parse(data);
21
22 return 1;
23}

The documentation for this class was generated from the following files: