Paperd.Ink Library 0.0.5
Library for interacting with Paperd.Ink devices.
Loading...
Searching...
No Matches
common.cpp
Go to the documentation of this file.
1#include "paperdink_common.h"
2
3size_t ArudinoStreamParser::write(const uint8_t *data, size_t size)
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}
17
18size_t ArudinoStreamParser::write(uint8_t data)
19{
20 parse(data);
21
22 return 1;
23}
24
26{
27 return 1;
28}
29
31{
32 return -1;
33}
34
36{
37 return -1;
38}
39
int read() override
Definition common.cpp:30
void flush() override
Definition common.cpp:40
size_t write(const uint8_t *buffer, size_t size) override
Definition common.cpp:3
int peek() override
Definition common.cpp:35
int available() override
Definition common.cpp:25