diff options
author | Karel Kočí <cynerd@email.cz> | 2017-03-09 07:04:55 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2017-03-09 07:04:55 +0100 |
commit | dfc471c4f68eba0c054e61dbb3567ee89e3a036f (patch) | |
tree | 69b6ee6b5be7da3087d782397cb0ec04734f23a9 /src | |
parent | 171e8e92686ac65e8f9a2962a975e6863c791a4f (diff) | |
download | avr-ioe-dfc471c4f68eba0c054e61dbb3567ee89e3a036f.tar.gz avr-ioe-dfc471c4f68eba0c054e61dbb3567ee89e3a036f.tar.bz2 avr-ioe-dfc471c4f68eba0c054e61dbb3567ee89e3a036f.zip |
Update spiblink example to use examples.mk
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 */ |