summaryrefslogtreecommitdiff
path: root/hid/lib/drivers-avr
diff options
context:
space:
mode:
Diffstat (limited to 'hid/lib/drivers-avr')
-rw-r--r--hid/lib/drivers-avr/spi.cpp5
-rw-r--r--hid/lib/drivers-avr/spi.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/hid/lib/drivers-avr/spi.cpp b/hid/lib/drivers-avr/spi.cpp
index ae54f545..d01c7070 100644
--- a/hid/lib/drivers-avr/spi.cpp
+++ b/hid/lib/drivers-avr/spi.cpp
@@ -21,8 +21,9 @@
#include "spi.h"
+
#ifdef CMD_SPI
-#include <SPI.h>
+
static volatile uint8_t _spi_in[8] = {0};
static volatile uint8_t _spi_in_index = 0;
@@ -30,6 +31,7 @@ static volatile uint8_t _spi_in_index = 0;
static volatile uint8_t _spi_out[8] = {0};
static volatile uint8_t _spi_out_index = 0;
+
namespace DRIVERS {
void Spi::begin() {
pinMode(MISO, OUTPUT);
@@ -77,4 +79,5 @@ ISR(SPI_STC_vect) {
SPDR = 0;
}
}
+
#endif
diff --git a/hid/lib/drivers-avr/spi.h b/hid/lib/drivers-avr/spi.h
index 4fb43d89..aade0a26 100644
--- a/hid/lib/drivers-avr/spi.h
+++ b/hid/lib/drivers-avr/spi.h
@@ -23,8 +23,10 @@
#pragma once
#include <Arduino.h>
+
#include "connection.h"
+
namespace DRIVERS {
struct Spi : public Connection {
Spi() : Connection(CONNECTION) {}