summaryrefslogtreecommitdiff
path: root/libhw/rp2040_include
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-02-24 22:54:30 -0700
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-03-04 00:16:34 -0700
commit3f49a57b99e7fe5aafa73e70ed146d98b1ae174c (patch)
treed72daabeedecbc397cdce739639f8cf2cb947685 /libhw/rp2040_include
parent7a1f764cda070de396fcb186e1f7457ff2704ba4 (diff)
libhw: rp2040_hwspi: Use interrupts instead of busy-polling
Diffstat (limited to 'libhw/rp2040_include')
-rw-r--r--libhw/rp2040_include/libhw/rp2040_hwspi.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libhw/rp2040_include/libhw/rp2040_hwspi.h b/libhw/rp2040_include/libhw/rp2040_hwspi.h
index a76a2c8..eb54cdc 100644
--- a/libhw/rp2040_include/libhw/rp2040_hwspi.h
+++ b/libhw/rp2040_include/libhw/rp2040_hwspi.h
@@ -9,6 +9,7 @@
#include <pico/binary_info.h> /* for bi_* */
+#include <libcr_ipc/sema.h>
#include <libmisc/private.h>
#include <libhw/generic/spi.h>
@@ -32,6 +33,7 @@ struct rp2040_hwspi {
/* mutable */
uint64_t dead_until_ns;
+ cr_sema_t sema;
END_PRIVATE(LIBHW_RP2040_HWSPI_H)
};
LO_IMPLEMENTATION_H(io_duplex_readwriter, struct rp2040_hwspi, rp2040_hwspi)