aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/spi.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/spi.c b/src/spi.c
index adf858d..d7af297 100644
--- a/src/spi.c
+++ b/src/spi.c
@@ -3,15 +3,14 @@
#ifdef CONFIG_SPI
volatile int8_t _spi_busy;
-volatile Mutex spi_mutex;
void (*spi_receive) (uint8_t data) = 0;
ISR(SPI_STC_vect, ISR_BLOCK) {
- _spi_busy = 0;
- if (spi_receive != NULL) {
- spir_w(SPDR);
- }
+ _spi_busy = 0;
+ if (spi_receive != 0) {
+ spi_receive(SPDR);
+ }
}
#endif /* CONFIG_SPI */