Skip to content

Commit

Permalink
fix (hal/rpi) : Fix GPIO number to reflect pin used raspberrypi shield
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelpolach321 committed Mar 6, 2025
1 parent bd3b1f5 commit eeaf1f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hal/port/unix/lt_port_raspberrypi_wiringpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit eeaf1f4

Please sign in to comment.