summaryrefslogtreecommitdiff
path: root/sw/Core/Src/spi.h
diff options
context:
space:
mode:
authorAlex Evans <715855+mmalex@users.noreply.github.com>2024-11-07 15:54:15 +0000
committerAlex Evans <715855+mmalex@users.noreply.github.com>2024-11-07 15:54:15 +0000
commit3a86555a7211f15fa1cb55de3cc898a761a188fd (patch)
tree1aae31ea3044a2641c9c03338b073c48500a6f90 /sw/Core/Src/spi.h
parentcc7afbbb54d2b66cc3a89f2748c85fc632634d1f (diff)
downloadplinky-3a86555a7211f15fa1cb55de3cc898a761a188fd.tar.gz
first baby steps at extending the webusb protocol to longer messages, processed faster, and add messages to read spi and wavetable ram
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 {