diff options
author | Maxim Devaev <[email protected]> | 2023-03-04 19:41:12 +0200 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2023-03-04 19:41:12 +0200 |
commit | 79e1b457b7fff18577745cfbb0b96d03c60281eb (patch) | |
tree | 8a43c3ef0b0585922ea886591c8428df3e76e877 /hid/lib/drivers-avr/spi.cpp | |
parent | 52ac8d93a18521f19dc45e9b4283417ed06f63d8 (diff) |
refactoring
Diffstat (limited to 'hid/lib/drivers-avr/spi.cpp')
-rw-r--r-- | hid/lib/drivers-avr/spi.cpp | 5 |
1 files changed, 4 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 |