summaryrefslogtreecommitdiff
path: root/sw/Core/Src/spi.h
diff options
context:
space:
mode:
Diffstat (limited to 'sw/Core/Src/spi.h')
-rwxr-xr-xsw/Core/Src/spi.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/Core/Src/spi.h b/sw/Core/Src/spi.h
index 9affd1f..b69e7e8 100755
--- a/sw/Core/Src/spi.h
+++ b/sw/Core/Src/spi.h
@@ -46,7 +46,8 @@ void spi_read_done(void) {
resetspistate();
} else {
int dacchan = spistate-MAX_SPI_STATE;
- spi_update_dac(dacchan);
+ if (dacchan<4 && dacchan>=0)
+ spi_update_dac(dacchan);
}
}
else {