diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/spi.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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 */ |