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
3
size_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
18
size_t
ArudinoStreamParser::write
(uint8_t data)
19
{
20
parse(data);
21
22
return
1;
23
}
24
25
int
ArudinoStreamParser::available
()
26
{
27
return
1;
28
}
29
30
int
ArudinoStreamParser::read
()
31
{
32
return
-1;
33
}
34
35
int
ArudinoStreamParser::peek
()
36
{
37
return
-1;
38
}
39
40
void
ArudinoStreamParser::flush
()
41
{
42
}
ArudinoStreamParser::read
int read() override
Definition
common.cpp:30
ArudinoStreamParser::flush
void flush() override
Definition
common.cpp:40
ArudinoStreamParser::write
size_t write(const uint8_t *buffer, size_t size) override
Definition
common.cpp:3
ArudinoStreamParser::peek
int peek() override
Definition
common.cpp:35
ArudinoStreamParser::available
int available() override
Definition
common.cpp:25
paperdink_common.h
src
common.cpp
Generated by
1.12.0