Added HEADER_I2C_PINS etc for rp application boards
This commit is contained in:
parent
fe32ac8ce7
commit
ce31f88e2d
|
@ -19,6 +19,10 @@ namespace pimoroni {
|
|||
static const unsigned int I2C_BG_SCL = 5;
|
||||
static const unsigned int I2C_BG_INT = 3;
|
||||
|
||||
static const unsigned int I2C_HEADER_SDA = 20;
|
||||
static const unsigned int I2C_HEADER_SCL = 21;
|
||||
static const unsigned int I2C_HEADER_INT = 19;
|
||||
|
||||
// SPI
|
||||
static const unsigned int SPI_DEFAULT_MOSI = 19;
|
||||
static const unsigned int SPI_DEFAULT_MISO = 16;
|
||||
|
@ -38,7 +42,10 @@ namespace pimoroni {
|
|||
|
||||
enum BOARD {
|
||||
BREAKOUT_GARDEN,
|
||||
PICO_EXPLORER
|
||||
PICO_EXPLORER,
|
||||
PLASMA_2040,
|
||||
INTERSTATE_75,
|
||||
SERVO_2040
|
||||
};
|
||||
|
||||
enum Polarity {
|
||||
|
|
|
@ -29,6 +29,13 @@ namespace pimoroni {
|
|||
scl = I2C_DEFAULT_SCL;
|
||||
interrupt = I2C_DEFAULT_INT;
|
||||
break;
|
||||
case PLASMA_2040:
|
||||
case INTERSTATE_75:
|
||||
case SERVO_2040:
|
||||
sda = I2C_HEADER_SDA;
|
||||
scl = I2C_HEADER_SCL;
|
||||
interrupt = I2C_HEADER_INT;
|
||||
break;
|
||||
}
|
||||
init();
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ from machine import Pin, PWM, ADC
|
|||
|
||||
BREAKOUT_GARDEN_I2C_PINS = {"sda": 4, "scl": 5}
|
||||
PICO_EXPLORER_I2C_PINS = {"sda": 20, "scl": 21}
|
||||
HEADER_I2C_PINS = {"sda": 20, "scl": 21}
|
||||
|
||||
|
||||
class Analog:
|
||||
|
|
Loading…
Reference in New Issue