Trunk fmt

This commit is contained in:
Ben Meadors 2024-07-09 12:16:56 -05:00
parent 9ad0addbbf
commit ba8d17b9c1
12 changed files with 47 additions and 43 deletions

View File

@ -156,7 +156,8 @@ bool EInkDisplay::connect()
} }
} }
#elif defined(HELTEC_WIRELESS_PAPER_V1_0) || defined(HELTEC_WIRELESS_PAPER) || defined(HELTEC_VISION_MASTER_E213) || defined(HELTEC_VISION_MASTER_E290) #elif defined(HELTEC_WIRELESS_PAPER_V1_0) || defined(HELTEC_WIRELESS_PAPER) || defined(HELTEC_VISION_MASTER_E213) || \
defined(HELTEC_VISION_MASTER_E290)
{ {
// Start HSPI // Start HSPI
hspi = new SPIClass(HSPI); hspi = new SPIClass(HSPI);

View File

@ -67,7 +67,8 @@ class EInkDisplay : public OLEDDisplay
GxEPD2_BW<EINK_DISPLAY_MODEL, EINK_DISPLAY_MODEL::HEIGHT> *adafruitDisplay = NULL; GxEPD2_BW<EINK_DISPLAY_MODEL, EINK_DISPLAY_MODEL::HEIGHT> *adafruitDisplay = NULL;
// If display uses HSPI // If display uses HSPI
#if defined(HELTEC_WIRELESS_PAPER) || defined(HELTEC_WIRELESS_PAPER_V1_0) || defined(HELTEC_VISION_MASTER_E213) || defined(HELTEC_VISION_MASTER_E290) #if defined(HELTEC_WIRELESS_PAPER) || defined(HELTEC_WIRELESS_PAPER_V1_0) || defined(HELTEC_VISION_MASTER_E213) || \
defined(HELTEC_VISION_MASTER_E290)
SPIClass *hspi = NULL; SPIClass *hspi = NULL;
#endif #endif

View File

@ -1498,7 +1498,8 @@ Screen::Screen(ScanI2C::DeviceAddress address, meshtastic_Config_DisplayConfig_O
(address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE); (address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE);
#elif defined(USE_ST7789) #elif defined(USE_ST7789)
#ifdef ESP_PLATFORM #ifdef ESP_PLATFORM
dispdev = new ST7789Spi(&SPI1, ST7789_RESET, ST7789_RS, ST7789_NSS,GEOMETRY_RAWMODE,TFT_WIDTH,TFT_HEIGHT,ST7789_SDA,ST7789_MISO,ST7789_SCK); dispdev = new ST7789Spi(&SPI1, ST7789_RESET, ST7789_RS, ST7789_NSS, GEOMETRY_RAWMODE, TFT_WIDTH, TFT_HEIGHT, ST7789_SDA,
ST7789_MISO, ST7789_SCK);
#else #else
dispdev = new ST7789Spi(&SPI1, ST7789_RESET, ST7789_RS, ST7789_NSS, GEOMETRY_RAWMODE, TFT_WIDTH, TFT_HEIGHT); dispdev = new ST7789Spi(&SPI1, ST7789_RESET, ST7789_RS, ST7789_NSS, GEOMETRY_RAWMODE, TFT_WIDTH, TFT_HEIGHT);
#endif #endif

View File

@ -716,7 +716,8 @@ void setup()
// Don't call screen setup until after nodedb is setup (because we need // Don't call screen setup until after nodedb is setup (because we need
// the current region name) // the current region name)
#if defined(ST7735_CS) || defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ST7789_CS) || defined(HX8357_CS) || defined(USE_ST7789) #if defined(ST7735_CS) || defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ST7789_CS) || defined(HX8357_CS) || \
defined(USE_ST7789)
screen->setup(); screen->setup();
#elif defined(ARCH_PORTDUINO) #elif defined(ARCH_PORTDUINO)
if (screen_found.port != ScanI2C::I2CPort::NO_I2C || settingsMap[displayPanel]) { if (screen_found.port != ScanI2C::I2CPort::NO_I2C || settingsMap[displayPanel]) {

View File

@ -268,7 +268,8 @@ void NodeDB::installDefaultConfig()
// FIXME: Default to bluetooth capability of platform as default // FIXME: Default to bluetooth capability of platform as default
config.bluetooth.enabled = true; config.bluetooth.enabled = true;
config.bluetooth.fixed_pin = defaultBLEPin; config.bluetooth.fixed_pin = defaultBLEPin;
#if defined(ST7735_CS) || defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ST7789_CS) || defined(HX8357_CS) || defined(USE_ST7789) #if defined(ST7735_CS) || defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ST7789_CS) || defined(HX8357_CS) || \
defined(USE_ST7789)
bool hasScreen = true; bool hasScreen = true;
#elif ARCH_PORTDUINO #elif ARCH_PORTDUINO
bool hasScreen = false; bool hasScreen = false;

View File

@ -60,7 +60,6 @@ extern "C" {
// #define SCREEN_ROTATE // #define SCREEN_ROTATE
// #define SCREEN_TRANSITION_FRAMERATE 5 // #define SCREEN_TRANSITION_FRAMERATE 5
// Number of pins defined in PinDescription array // Number of pins defined in PinDescription array
#define PINS_COUNT (48) #define PINS_COUNT (48)
#define NUM_DIGITAL_PINS (48) #define NUM_DIGITAL_PINS (48)
@ -87,7 +86,8 @@ extern "C" {
* Buttons * Buttons
*/ */
#define PIN_BUTTON1 (32 + 10) #define PIN_BUTTON1 (32 + 10)
//#define PIN_BUTTON2 (0 + 18) // 0.18 is labeled on the board as RESET but we configure it in the bootloader as a regular GPIO // #define PIN_BUTTON2 (0 + 18) // 0.18 is labeled on the board as RESET but we configure it in the bootloader as a regular
// GPIO
/* /*
No longer populated on PCB No longer populated on PCB
@ -104,7 +104,6 @@ No longer populated on PCB
#define PIN_WIRE_SDA (26) #define PIN_WIRE_SDA (26)
#define PIN_WIRE_SCL (27) #define PIN_WIRE_SCL (27)
// QSPI Pins // QSPI Pins
#define PIN_QSPI_SCK (32 + 14) #define PIN_QSPI_SCK (32 + 14)
#define PIN_QSPI_CS (32 + 15) #define PIN_QSPI_CS (32 + 15)
@ -128,7 +127,8 @@ No longer populated on PCB
#define SX126X_DIO1 (0 + 20) #define SX126X_DIO1 (0 + 20)
// Note DIO2 is attached internally to the module to an analog switch for TX/RX switching // Note DIO2 is attached internally to the module to an analog switch for TX/RX switching
// #define SX1262_DIO3 \ // #define SX1262_DIO3 \
// (0 + 21) // This is used as an *output* from the sx1262 and connected internally to power the tcxo, do not drive from the main // (0 + 21) // This is used as an *output* from the sx1262 and connected internally to power the tcxo, do not drive from the
// main
// CPU? // CPU?
#define SX126X_BUSY (0 + 17) #define SX126X_BUSY (0 + 17)
#define SX126X_RESET (0 + 25) #define SX126X_RESET (0 + 25)
@ -136,7 +136,8 @@ No longer populated on PCB
#define SX126X_DIO2_AS_RF_SWITCH #define SX126X_DIO2_AS_RF_SWITCH
#define SX126X_DIO3_TCXO_VOLTAGE 1.8 #define SX126X_DIO3_TCXO_VOLTAGE 1.8
#define PIN_SPI1_MISO ST7789_MISO // FIXME not really needed, but for now the SPI code requires something to be defined, pick an used GPIO #define PIN_SPI1_MISO \
ST7789_MISO // FIXME not really needed, but for now the SPI code requires something to be defined, pick an used GPIO
#define PIN_SPI1_MOSI ST7789_SDA #define PIN_SPI1_MOSI ST7789_SDA
#define PIN_SPI1_SCK ST7789_SCK #define PIN_SPI1_SCK ST7789_SCK

View File

@ -33,10 +33,8 @@
// #define SCREEN_TRANSITION_FRAMERATE 5 // #define SCREEN_TRANSITION_FRAMERATE 5
#define BRIGHTNESS_DEFAULT 100 // Medium Low Brightnes #define BRIGHTNESS_DEFAULT 100 // Medium Low Brightnes
// #define SLEEP_TIME 120 // #define SLEEP_TIME 120
/* /*
* SPI interfaces * SPI interfaces
*/ */