Skip to content

Commit 41dd16d

Browse files
committed
h33: fix external SPI pins assignment
1 parent e9a9033 commit 41dd16d

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

variants/PORTENTA_H33/pins_arduino.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ static const uint8_t A7 = PIN_A7;
9292
#define SPI_HOWMANY 2
9393

9494
#define PIN_SPI_MOSI 8
95-
#define PIN_SPI_MISO 9
96-
#define PIN_SPI_SCK 10
95+
#define PIN_SPI_MISO 10
96+
#define PIN_SPI_SCK 9
9797
#define PIN_SPI_CS 7
9898
#define IS_SPI_SCI 1
9999

@@ -107,6 +107,7 @@ static const uint8_t MOSI = PIN_SPI_MOSI;
107107
static const uint8_t MISO = PIN_SPI_MISO;
108108
static const uint8_t SCK = PIN_SPI_SCK;
109109
static const uint8_t CS = PIN_SPI_CS;
110+
static const uint8_t SS = PIN_SPI_CS;
110111

111112
/****** CAN CORE DEFINES ******/
112113

variants/PORTENTA_H33/variant.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ const uint16_t P311_b[] = {
1717
};
1818
#define P311 P311_b
1919

20+
const uint16_t P204_b[] = {
21+
PIN_PWM|CHANNEL_4|PWM_CHANNEL_B|GPT_ODD_CFG,
22+
SCI_CHANNEL|PIN_SCK|CHANNEL_4|SCI_EVEN_CFG,
23+
PIN_SCK|CHANNEL_0|LAST_ITEM_GUARD
24+
};
25+
#define P204 P204_b
26+
2027
uint16_t getPinCfg(const uint16_t *cfg, PinCfgReq_t req, bool prefer_sci /*= false*/) {
2128
if(cfg == nullptr) {
2229
return 0;

0 commit comments

Comments
 (0)