From eeaf1f464a57deb29cacd79003025b913f1af9d4 Mon Sep 17 00:00:00 2001 From: Pavel Polach Date: Thu, 6 Mar 2025 12:36:46 +0100 Subject: [PATCH] fix (hal/rpi) : Fix GPIO number to reflect pin used raspberrypi shield --- hal/port/unix/lt_port_raspberrypi_wiringpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hal/port/unix/lt_port_raspberrypi_wiringpi.c b/hal/port/unix/lt_port_raspberrypi_wiringpi.c index 0bb0ce1..509ee95 100644 --- a/hal/port/unix/lt_port_raspberrypi_wiringpi.c +++ b/hal/port/unix/lt_port_raspberrypi_wiringpi.c @@ -19,7 +19,7 @@ #include "libtropic_port.h" // CS is controlled separately -#define GPIO_CS 14 +#define GPIO_CS 25 #define SPI_SPEED_HZ 5000000 // File descriptor, used in init and deinit @@ -70,7 +70,7 @@ lt_ret_t lt_port_init(lt_handle_t *h) // Setup CS pin wiringPiSetupGpio(); - pinMode(14, OUTPUT); + pinMode(GPIO_CS, OUTPUT); digitalWrite(GPIO_CS, HIGH); // Setup SPI, returns fd, error if -1 is returned