summaryrefslogtreecommitdiff
path: root/cmd/sbc_harness/hw/rp2040_hwspi.h
diff options
context:
space:
mode:
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,