Skip to content

Commit 0684fb5

Browse files
committed
x8: expose hidden i2c and spi ports
1 parent 2b98fa3 commit 0684fb5

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

variants/PORTENTA_X8/pins_arduino.h

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ static const uint8_t A7 = PIN_A7;
7474
#define D20 (20u)
7575
#define D21 (21u)
7676

77-
//DACs
78-
#define DAC (A6)
79-
8077
// Serial
8178
#define PIN_SERIAL_RX (22ul)
8279
#define PIN_SERIAL_TX (21ul)
@@ -86,19 +83,19 @@ static const uint8_t A7 = PIN_A7;
8683
#define SERIAL1_RX (digitalPinToPinName(PIN_SERIAL_RX))
8784

8885
// SPI
89-
#define PIN_SPI_MISO (10u)
90-
#define PIN_SPI_MOSI (8u)
91-
#define PIN_SPI_SCK (9u)
92-
#define PIN_SPI_SS (7u)
86+
#define PIN_SPI_MISO (0u)
87+
#define PIN_SPI_MOSI (A6)
88+
#define PIN_SPI_SCK (A5)
89+
#define PIN_SPI_SS (1u)
9390

9491
static const uint8_t SS = PIN_SPI_SS; // SPI Slave SS not used. Set here only for reference.
9592
static const uint8_t MOSI = PIN_SPI_MOSI;
9693
static const uint8_t MISO = PIN_SPI_MISO;
9794
static const uint8_t SCK = PIN_SPI_SCK;
9895

9996
// Wire
100-
#define PIN_WIRE_SDA (11u)
101-
#define PIN_WIRE_SCL (12u)
97+
#define PIN_WIRE_SDA (38u)
98+
#define PIN_WIRE_SCL (29u)
10299

103100
#define RPC_SERIAL 1
104101
#define HAS_UNIQUE_ISERIAL_DESCRIPTOR
@@ -111,17 +108,12 @@ static const uint8_t SCK = PIN_SPI_SCK;
111108
uint8_t getUniqueSerialNumber(uint8_t* name);
112109
void _ontouch1200bps_();
113110

114-
#define WIRE_HOWMANY 0
115-
116-
#define I2C_SDA (digitalPinToPinName(PIN_WIRE_SDA))
117-
#define I2C_SCL (digitalPinToPinName(PIN_WIRE_SCL))
111+
#define WIRE_HOWMANY 1
118112

119-
#define I2C_SDA_INTERNAL (PB_7)
120-
#define I2C_SCL_INTERNAL (PB_6)
121-
#define I2C_SDA1 I2C_SDA_INTERNAL
122-
#define I2C_SCL1 I2C_SCL_INTERNAL
113+
#define I2C_SDA (PC_9) // marked as PWM8
114+
#define I2C_SCL (PA_8) // marked as PWM6
123115

124-
#define SPI_HOWMANY 0
116+
#define SPI_HOWMANY 1
125117

126118
#define SPI_MISO (digitalPinToPinName(PIN_SPI_MISO))
127119
#define SPI_MOSI (digitalPinToPinName(PIN_SPI_MOSI))

0 commit comments

Comments
 (0)