20 button.
input().pullup();
28 BENCHMARK(
"1.1 Arduino core digitalRead", 1000) {
33 BENCHMARK(
"1.2 Arduino core digitalWrite(HIGH)", 1000) {
37 BENCHMARK(
"1.3 Arduino core digitalWrite(LOW)", 1000) {
41 BENCHMARK(
"1.4 Arduino core toggle; digitalRead-digitalWrite", 1000) {
45 BENCHMARK(
"1.5 Arduino core toggle; digitalWrite", 1000) {
50 BENCHMARK(
"2.1 GPIO pin value operator", 1000) {
55 BENCHMARK(
"2.2 GPIO high member function", 1000) {
59 BENCHMARK(
"2.3 GPIO low member function", 1000) {
63 BENCHMARK(
"2.4 GPIO assignment HIGH", 1000) {
67 BENCHMARK(
"2.5 GPIO assignment LOW", 1000) {
71 BENCHMARK(
"2.6 GPIO toggle; value and assignment operator", 1000) {
75 BENCHMARK(
"2.7 GPIO toggle; high and low member functions", 1000) {
80 BENCHMARK(
"2.8 GPIO toggle; assignment operator, HIGH/LOW", 1000) {
85 BENCHMARK(
"2.9 GPIO toggle member function", 1000) {
102 BENCHMARK(
"3.1 Arduino core digitalRead", 1000) {
103 bool state = digitalRead(DIN_PIN);
107 BENCHMARK(
"3.2 Arduino core digitalWrite(HIGH)", 1000) {
108 digitalWrite(DOUT_PIN, HIGH);
111 BENCHMARK(
"3.3 Arduino core digitalWrite(LOW)", 1000) {
112 digitalWrite(DOUT_PIN, LOW);
115 BENCHMARK(
"3.4 Arduino core toggle; digitalRead-digitalWrite", 1000) {
116 digitalWrite(DOUT_PIN, !digitalRead(DOUT_PIN));
119 BENCHMARK(
"3.5 Arduino core toggle; digitalWrite", 1000) {
120 digitalWrite(DOUT_PIN, HIGH);
121 digitalWrite(DOUT_PIN, LOW);
124 BENCHMARK(
"4.1 GPIO pin value operator", 1000) {
129 BENCHMARK(
"4.2 GPIO high member function", 1000) {
133 BENCHMARK(
"4.3 GPIO low member function", 1000) {
137 BENCHMARK(
"4.4 GPIO assignment HIGH", 1000) {
141 BENCHMARK(
"4.5 GPIO assignment LOW", 1000) {
145 BENCHMARK(
"4.6 GPIO toggle; value and assignment operator", 1000) {
149 BENCHMARK(
"4.7 GPIO toggle; high and low member functions", 1000) {
154 BENCHMARK(
"4.8 GPIO toggle; assignment operator", 1000) {
159 BENCHMARK(
"4.9 GPIO toggle member function", 1000) {
#define BENCHMARK(msg, scale)
#define BENCHMARK_BASELINE(scale)
Software::Serial< BOARD::D0 > Serial