From c304935918076ac49038d7c3d059d8b39526c2ca Mon Sep 17 00:00:00 2001 From: KLASSENTS Date: Mon, 3 Feb 2025 12:56:36 +0700 Subject: [PATCH] =?UTF-8?q?=D0=BD=D0=B0=20=D1=81=D1=82=D0=B0=D1=80=D1=82?= =?UTF-8?q?=D0=B5=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=D1=8E=D1=82=20?= =?UTF-8?q?=D0=BE=D0=B1=D0=B0=20i2c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- variants/start/pins_arduino.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/variants/start/pins_arduino.h b/variants/start/pins_arduino.h index 8a95936..1c0907c 100644 --- a/variants/start/pins_arduino.h +++ b/variants/start/pins_arduino.h @@ -168,11 +168,17 @@ void spi_onBegin(uint8_t spiNum); static inline void spi_onEnd(uint8_t spiNum){} // I2C -#define PIN_WIRE_SDA (P1_12) -#define PIN_WIRE_SCL (P1_13) -#define I2C_NUM (1) // i2c number 1 -static const uint8_t SDA = PIN_WIRE_SDA; -static const uint8_t SCL = PIN_WIRE_SCL; +#define I2C_COMMON_QTY 2 +// Wire (I2C1) +#define PIN_WIRE_SDA P1_12 +#define PIN_WIRE_SCL P1_13 +static const uint8_t SDA = PIN_WIRE_SDA; +static const uint8_t SCL = PIN_WIRE_SCL; +// Wire1 (I2C0) +#define PIN_WIRE_SDA1 P0_9 +#define PIN_WIRE_SCL1 P0_10 +static const uint8_t SDA1 = PIN_WIRE_SDA1; +static const uint8_t SCL1 = PIN_WIRE_SCL1; // available frequencies #define WIRE_FREQ_100K 100000 #define WIRE_FREQ_400K 400000