summaryrefslogtreecommitdiff
path: root/cmd/sbc_harness/hw/rp2040_hwspi.h
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-10-16 15:30:54 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-10-16 15:30:54 -0600
commite0085b57347bb3eec06f84abf37be3ae590e75f7 (patch)
tree2f338fde18cd4dab1a7115e161ed0343845c2cf9 /cmd/sbc_harness/hw/rp2040_hwspi.h
parentc65052854eeef203dfecb73844ea69b368214b42 (diff)
closer to compiling
Diffstat (limited to 'cmd/sbc_harness/hw/rp2040_hwspi.h')
-rw-r--r--cmd/sbc_harness/hw/rp2040_hwspi.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/cmd/sbc_harness/hw/rp2040_hwspi.h b/cmd/sbc_harness/hw/rp2040_hwspi.h
index 22ef6fa..55a6759 100644
--- a/cmd/sbc_harness/hw/rp2040_hwspi.h
+++ b/cmd/sbc_harness/hw/rp2040_hwspi.h
@@ -1,6 +1,8 @@
#ifndef _RP2040_HWSPI_H_
#define _RP2040_HWSPI_H_
+#include <pico/binary_info.h> /* for bi_* */
+
#include "hw/spi.h"
enum rp2040_hwspi_instance {
@@ -34,13 +36,13 @@ struct rp2040_hwspi {
inst_num, mode, baudrate_hz, \
pin_miso, pin_mosi, pin_clk, pin_cs) \
do { \
- bi_decl(bi_4_pins_with_names(pin_miso, name" SPI MISO", \
- pin_mosi, name" SPI MOSI", \
- pin_mosi, name" SPI CLK", \
- pin_mosi, name" SPI CS")); \
+ bi_decl(bi_4pins_with_names(pin_miso, name" SPI MISO", \
+ pin_mosi, name" SPI MOSI", \
+ pin_mosi, name" SPI CLK", \
+ pin_mosi, name" SPI CS")); \
_rp2040_hwspi_init(self, \
inst_num, mode, baudrate_hz, \
- pin_miso, pin_mosi, pin_c;k, pin_cs); \
+ pin_miso, pin_mosi, pin_clk, pin_cs); \
} while(0)
void _rp2040_hwspi_init(struct rp2040_hwspi *self,
enum rp2040_hwspi_instance inst_num,