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