From dfc471c4f68eba0c054e61dbb3567ee89e3a036f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 9 Mar 2017 07:04:55 +0100 Subject: Update spiblink example to use examples.mk --- src/spi.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') 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 */ -- cgit v1.2.3