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