From 9439c6f1caffd938673018f3af7460b33a12528e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 20 Mar 2016 16:39:30 +0100 Subject: Another work progress --- src/spi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/spi.c') diff --git a/src/spi.c b/src/spi.c index 69012fa..adf858d 100644 --- a/src/spi.c +++ b/src/spi.c @@ -8,11 +8,9 @@ volatile Mutex spi_mutex; void (*spi_receive) (uint8_t data) = 0; ISR(SPI_STC_vect, ISR_BLOCK) { - void (*spir_w) (uint8_t data) = spi_receive; _spi_busy = 0; - while (spir_w != NULL) { + if (spi_receive != NULL) { spir_w(SPDR); - spir_w++; } } -- cgit v1.2.3