Update board init
This commit is contained in:
parent
f1677b990c
commit
810d6e2cce
99 changed files with 982 additions and 835 deletions
|
|
@ -379,6 +379,16 @@ void disablePeripherals()
|
|||
// GNSS VDD
|
||||
PMU->disablePowerOutput(XPOWERS_ALDO3);
|
||||
|
||||
#if defined(T_BEAM_S3_SUPREME)
|
||||
PMU->disablePowerOutput(XPOWERS_ALDO4);
|
||||
PMU->disablePowerOutput(XPOWERS_ALDO1);
|
||||
PMU->disablePowerOutput(XPOWERS_BLDO1);
|
||||
PMU->disablePowerOutput(XPOWERS_BLDO2);
|
||||
PMU->disablePowerOutput(XPOWERS_DCDC3);
|
||||
PMU->disablePowerOutput(XPOWERS_DCDC4);
|
||||
PMU->disablePowerOutput(XPOWERS_DCDC5);
|
||||
#endif
|
||||
|
||||
} else if (PMU->getChipModel() == XPOWERS_AXP192) {
|
||||
|
||||
// Disable all PMU interrupts
|
||||
|
|
@ -704,11 +714,7 @@ void setupBoards(bool disable_u8g2 )
|
|||
#endif /*SD_SHARE_SPI_BUS*/
|
||||
#endif /*HAS_SDCARD*/
|
||||
|
||||
#ifdef I2C_SDA
|
||||
Wire.begin(I2C_SDA, I2C_SCL);
|
||||
Serial.println("Scan Wire...");
|
||||
scanDevices(&Wire);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef I2C1_SDA
|
||||
Wire1.begin(I2C1_SDA, I2C1_SCL);
|
||||
|
|
@ -758,22 +764,12 @@ void setupBoards(bool disable_u8g2 )
|
|||
digitalWrite(BOARD_LED, LED_ON);
|
||||
#endif
|
||||
|
||||
#ifdef GPS_EN_PIN
|
||||
pinMode(GPS_EN_PIN, OUTPUT);
|
||||
digitalWrite(GPS_EN_PIN, HIGH);
|
||||
#endif
|
||||
|
||||
#ifdef GPS_RST_PIN
|
||||
pinMode(GPS_RST_PIN, OUTPUT);
|
||||
digitalWrite(GPS_RST_PIN, HIGH);
|
||||
#endif
|
||||
|
||||
#ifdef GPS_WAKEUP_PIN
|
||||
pinMode(GPS_WAKEUP_PIN, OUTPUT);
|
||||
digitalWrite(GPS_WAKEUP_PIN, HIGH);
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(ARDUINO_ARCH_STM32)
|
||||
SerialGPS.println("@GSR"); delay(300);
|
||||
SerialGPS.println("@GSR"); delay(300);
|
||||
|
|
@ -809,6 +805,13 @@ void setupBoards(bool disable_u8g2 )
|
|||
|
||||
beginPower();
|
||||
|
||||
// Perform an I2C scan after power-on operation
|
||||
#ifdef I2C_SDA
|
||||
Wire.begin(I2C_SDA, I2C_SCL);
|
||||
Serial.println("Scan Wire...");
|
||||
scanDevices(&Wire);
|
||||
#endif
|
||||
|
||||
beginSDCard();
|
||||
|
||||
if (!disable_u8g2) {
|
||||
|
|
|
|||
|
|
@ -433,7 +433,7 @@
|
|||
|
||||
#define GPS_RX_PIN (9)
|
||||
#define GPS_TX_PIN (8)
|
||||
#define GPS_WAKEUP_PIN (7)
|
||||
#define GPS_EN_PIN (7) //L76K only
|
||||
#define GPS_PPS_PIN (6)
|
||||
|
||||
#define BUTTON_PIN (0)
|
||||
|
|
@ -635,7 +635,7 @@
|
|||
#define BUTTON2_PIN (2) /*BUTTON 2 = GPIO3*/
|
||||
|
||||
#define BUTTON_PIN_MASK GPIO_SEL_0
|
||||
#define BUTTON_CONUT (2)
|
||||
#define BUTTON_COUNT (2)
|
||||
#define BUTTON_ARRAY {BUTTON_PIN,BUTTON2_PIN/*BUTTON 2 = GPIO3*/}
|
||||
|
||||
#define SPI_MOSI (11)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue