Arduino-GPIO
General Purpose Input/Output (GPIO) library for Arduino
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
ShiftInOut.ino
Go to the documentation of this file.
1
#include "GPIO.h"
2
#include "
SRPIO.h
"
3
#include "
benchmark.h
"
4
5
SRPIO<LSBFIRST, BOARD::D12, BOARD::D13>
srpio
;
6
7
void
setup
()
8
{
9
Serial
.begin(57600);
10
while
(!
Serial
);
11
BENCHMARK_BASELINE
(1000);
12
}
13
14
void
loop
()
15
{
16
uint8_t value = 0;
17
18
BENCHMARK
(
"1. SRPIO input operator"
, 1000) {
19
srpio >> value;
20
}
21
22
value = 0xa5;
23
BENCHMARK
(
"2. SRPIO output operator"
, 1000) {
24
srpio << value;
25
}
26
27
Serial
.println();
28
delay(2000);
29
}
SRPIO.h
srpio
SRPIO< LSBFIRST, BOARD::D1, BOARD::D2 > srpio
Definition:
ShiftInOut.ino:7
BENCHMARK
#define BENCHMARK(msg, scale)
Definition:
benchmark.h:52
BENCHMARK_BASELINE
#define BENCHMARK_BASELINE(scale)
Definition:
benchmark.h:34
Serial
Software::Serial< BOARD::D0 > Serial
Definition:
ShiftInOut.ino:6
SRPIO
Definition:
SRPIO.h:31
benchmark.h
loop
void loop()
Definition:
ShiftInOut.ino:16
setup
void setup()
Definition:
ShiftInOut.ino:9
examples
ShiftInOut
ShiftInOut.ino
Generated on Sat Oct 14 2017 16:03:22 for Arduino-GPIO by
1.8.11