aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2017-03-09 07:04:55 +0100
committerKarel Kočí <cynerd@email.cz>2017-03-09 07:04:55 +0100
commitdfc471c4f68eba0c054e61dbb3567ee89e3a036f (patch)
tree69b6ee6b5be7da3087d782397cb0ec04734f23a9 /src
parent171e8e92686ac65e8f9a2962a975e6863c791a4f (diff)
downloadavr-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.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 */