сомик умеет двумя i2c работать
This commit is contained in:
parent
f11176c56b
commit
cda13f97dc
@ -159,11 +159,17 @@ void spi_onBegin(uint8_t spiNum);
|
|||||||
static inline void spi_onEnd(uint8_t spiNum){}
|
static inline void spi_onEnd(uint8_t spiNum){}
|
||||||
|
|
||||||
// I2C
|
// I2C
|
||||||
#define PIN_WIRE_SDA (P1_12)
|
#define I2C_COMMON_QTY 2
|
||||||
#define PIN_WIRE_SCL (P1_13)
|
// Wire (I2C1)
|
||||||
#define I2C_NUM (1) // i2c number 1
|
#define PIN_WIRE_SDA P1_12
|
||||||
|
#define PIN_WIRE_SCL P1_13
|
||||||
static const uint8_t SDA = PIN_WIRE_SDA;
|
static const uint8_t SDA = PIN_WIRE_SDA;
|
||||||
static const uint8_t SCL = PIN_WIRE_SCL;
|
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
|
// available frequencies
|
||||||
#define WIRE_FREQ_100K 100000
|
#define WIRE_FREQ_100K 100000
|
||||||
#define WIRE_FREQ_400K 400000
|
#define WIRE_FREQ_400K 400000
|
||||||
@ -188,8 +194,6 @@ int8_t digitalPinToGpioIntMux(uint8_t digPinNumber);
|
|||||||
int8_t digitalPinToGpioIntLine(uint8_t digPinNumber);
|
int8_t digitalPinToGpioIntLine(uint8_t digPinNumber);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user