mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-03 10:13:44 +00:00
Finally got trunk working (somehow?), this is just cleanup with trunk fmt
This commit is contained in:
parent
c82f23ed2a
commit
ff92b869e0
@ -33,24 +33,23 @@ const uint32_t g_ADigitalPinMap[] = {
|
||||
void initVariant()
|
||||
{
|
||||
// LED1 & LED2
|
||||
//pinMode(PIN_LED1, OUTPUT);
|
||||
//ledOff(PIN_LED1);
|
||||
// pinMode(PIN_LED1, OUTPUT);
|
||||
// ledOff(PIN_LED1);
|
||||
|
||||
//pinMode(PIN_LED2, OUTPUT);
|
||||
//ledOff(PIN_LED2);
|
||||
//pinMode(PIN_LED1, OUTPUT);
|
||||
//digitalWrite(PIN_LED1, LOW);
|
||||
pinMode(24,OUTPUT);
|
||||
// pinMode(PIN_LED2, OUTPUT);
|
||||
// ledOff(PIN_LED2);
|
||||
// pinMode(PIN_LED1, OUTPUT);
|
||||
// digitalWrite(PIN_LED1, LOW);
|
||||
pinMode(24, OUTPUT);
|
||||
digitalWrite(24, HIGH);
|
||||
//pinMode(25,OUTPUT);
|
||||
//digitalWrite(25, HIGH);
|
||||
// pinMode(25,OUTPUT);
|
||||
// digitalWrite(25, HIGH);
|
||||
|
||||
// 3V3 Power Rail
|
||||
pinMode(PIN_3V3_EN, OUTPUT);
|
||||
digitalWrite(PIN_3V3_EN, HIGH);
|
||||
//pinMode(PIN_GPS_EN, OUTPUT);
|
||||
//digitalWrite(PIN_GPS_EN, HIGH);
|
||||
//pinMode(GPS_TX_PIN, OUTPUT);
|
||||
//pinMode(GPS_RX_PIN, INPUT_PULLUP);
|
||||
|
||||
// pinMode(PIN_GPS_EN, OUTPUT);
|
||||
// digitalWrite(PIN_GPS_EN, HIGH);
|
||||
// pinMode(GPS_TX_PIN, OUTPUT);
|
||||
// pinMode(GPS_RX_PIN, INPUT_PULLUP);
|
||||
}
|
@ -24,8 +24,8 @@
|
||||
/** Master clock frequency */
|
||||
#define VARIANT_MCK (64000000ul)
|
||||
|
||||
//#define USE_LFXO // Board uses 32khz crystal for LF
|
||||
#define USE_LFRC // Board uses RC for LF
|
||||
// #define USE_LFXO // Board uses 32khz crystal for LF
|
||||
#define USE_LFRC // Board uses RC for LF
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Headers
|
||||
@ -43,28 +43,25 @@ extern "C" {
|
||||
#define NUM_ANALOG_INPUTS (2)
|
||||
#define NUM_ANALOG_OUTPUTS (0)
|
||||
|
||||
|
||||
|
||||
#define BUTTON_PIN (38) // If defined, this will be used for user button presses,
|
||||
#define BUTTON_NEED_PULLUP
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (24) // 24
|
||||
#define PIN_LED2 (-1) // Watchdog enable pin25
|
||||
// #define PIN_LED3 (-1)
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (24) //24
|
||||
#define PIN_LED2 (-1) //Watchdog enable pin25
|
||||
//#define PIN_LED3 (-1)
|
||||
|
||||
//#define LED_RED PIN_LED1
|
||||
//#define LED_GREEN LED_PIN
|
||||
// #define LED_RED PIN_LED1
|
||||
// #define LED_GREEN LED_PIN
|
||||
#define LED_BLUE PIN_LED1
|
||||
|
||||
//#define LED_CONN PIN_LED1
|
||||
// #define LED_CONN PIN_LED1
|
||||
#define LED_BUILTIN PIN_LED1
|
||||
|
||||
#define LED_STATE_ON 0 // State when LED is litted
|
||||
#define LED_INVERTED 1
|
||||
// Testing USB detection
|
||||
//#define NRF_APM
|
||||
// #define NRF_APM
|
||||
/*
|
||||
* Analog pins
|
||||
*/
|
||||
@ -83,10 +80,9 @@ static const uint8_t A7 = PIN_A7;
|
||||
#define ADC_RESOLUTION 14
|
||||
|
||||
// Other pins
|
||||
//#define PIN_AREF (2)
|
||||
// #define PIN_AREF (2)
|
||||
|
||||
|
||||
//static const uint8_t AREF = PIN_AREF;
|
||||
// static const uint8_t AREF = PIN_AREF;
|
||||
|
||||
/*
|
||||
* Serial interfaces
|
||||
@ -94,17 +90,14 @@ static const uint8_t A7 = PIN_A7;
|
||||
#define PIN_SERIAL1_RX (40)
|
||||
#define PIN_SERIAL1_TX (7)
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* SPI Interfaces
|
||||
*/
|
||||
#define SPI_INTERFACES_COUNT 2
|
||||
|
||||
#define PIN_SPI_MISO (8)
|
||||
#define PIN_SPI_MOSI (32 + 9)
|
||||
#define PIN_SPI_SCK (11)
|
||||
#define PIN_SPI_MISO (8)
|
||||
#define PIN_SPI_MOSI (32 + 9)
|
||||
#define PIN_SPI_SCK (11)
|
||||
|
||||
#define PIN_SPI1_MISO (23)
|
||||
#define PIN_SPI1_MOSI (21)
|
||||
@ -118,17 +111,15 @@ static const uint8_t SCK = PIN_SPI_SCK;
|
||||
/*
|
||||
* eink display pins
|
||||
*/
|
||||
//#define USE_EINK
|
||||
// #define USE_EINK
|
||||
|
||||
#define PIN_EINK_CS (15)
|
||||
#define PIN_EINK_BUSY (16)
|
||||
#define PIN_EINK_DC (14)
|
||||
#define PIN_EINK_RES (17) //17
|
||||
#define PIN_EINK_RES (17) // 17
|
||||
#define PIN_EINK_SCLK (19)
|
||||
#define PIN_EINK_MOSI (21) // also called SDI
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Wire Interfaces
|
||||
*/
|
||||
@ -164,7 +155,6 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#define USE_SX1262
|
||||
#define SX126X_CS (12)
|
||||
#define SX126X_DIO1 (32 + 1)
|
||||
@ -175,8 +165,6 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
|
||||
|
||||
|
||||
// enables 3.3V periphery like GPS or IO Module
|
||||
// Do not toggle this for GPS power savings
|
||||
#define PIN_3V3_EN (25)
|
||||
@ -188,19 +176,17 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG
|
||||
// Therefore must be 1 to keep peripherals powered
|
||||
// Power is on the controllable 3V3_S rail
|
||||
// #define PIN_GPS_RESET (34)
|
||||
//#define HAS_GPS 1
|
||||
//#define GNSS_ATGM336H
|
||||
//#define GPS_BAUDRATE 9600
|
||||
//#undef GPS_RX_PIN
|
||||
//#undef GPS_TX_PIN
|
||||
//#define PIN_GPS_PPS 36 // Pulse per second input from the GPS
|
||||
// #define HAS_GPS 1
|
||||
// #define GNSS_ATGM336H
|
||||
// #define GPS_BAUDRATE 9600
|
||||
// #undef GPS_RX_PIN
|
||||
// #undef GPS_TX_PIN
|
||||
// #define PIN_GPS_PPS 36 // Pulse per second input from the GPS
|
||||
|
||||
#define GPS_TX_PIN PIN_SERIAL1_RX // This is for bits going TOWARDS the CPU
|
||||
#define GPS_RX_PIN PIN_SERIAL1_TX // This is for bits going TOWARDS the GPS
|
||||
|
||||
//#define GPS_THREAD_INTERVAL 50
|
||||
|
||||
|
||||
// #define GPS_THREAD_INTERVAL 50
|
||||
|
||||
// Define pin to enable GPS toggle (set GPIO to LOW) via user button triple press
|
||||
#define PIN_GPS_EN (0)
|
||||
@ -219,10 +205,6 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG
|
||||
#define VBAT_AR_INTERNAL AR_INTERNAL_3_0
|
||||
#define ADC_MULTIPLIER 1.42
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -33,24 +33,23 @@ const uint32_t g_ADigitalPinMap[] = {
|
||||
void initVariant()
|
||||
{
|
||||
// LED1 & LED2
|
||||
//pinMode(PIN_LED1, OUTPUT);
|
||||
//ledOff(PIN_LED1);
|
||||
// pinMode(PIN_LED1, OUTPUT);
|
||||
// ledOff(PIN_LED1);
|
||||
|
||||
//pinMode(PIN_LED2, OUTPUT);
|
||||
//ledOff(PIN_LED2);
|
||||
//pinMode(PIN_LED1, OUTPUT);
|
||||
//digitalWrite(PIN_LED1, LOW);
|
||||
pinMode(24,OUTPUT);
|
||||
// pinMode(PIN_LED2, OUTPUT);
|
||||
// ledOff(PIN_LED2);
|
||||
// pinMode(PIN_LED1, OUTPUT);
|
||||
// digitalWrite(PIN_LED1, LOW);
|
||||
pinMode(24, OUTPUT);
|
||||
digitalWrite(24, HIGH);
|
||||
//pinMode(25,OUTPUT);
|
||||
//digitalWrite(25, HIGH);
|
||||
// pinMode(25,OUTPUT);
|
||||
// digitalWrite(25, HIGH);
|
||||
|
||||
// 3V3 Power Rail
|
||||
pinMode(PIN_3V3_EN, OUTPUT);
|
||||
digitalWrite(PIN_3V3_EN, HIGH);
|
||||
//pinMode(PIN_GPS_EN, OUTPUT);
|
||||
//digitalWrite(PIN_GPS_EN, HIGH);
|
||||
//pinMode(GPS_TX_PIN, OUTPUT);
|
||||
//pinMode(GPS_RX_PIN, INPUT_PULLUP);
|
||||
|
||||
// pinMode(PIN_GPS_EN, OUTPUT);
|
||||
// digitalWrite(PIN_GPS_EN, HIGH);
|
||||
// pinMode(GPS_TX_PIN, OUTPUT);
|
||||
// pinMode(GPS_RX_PIN, INPUT_PULLUP);
|
||||
}
|
@ -24,8 +24,8 @@
|
||||
/** Master clock frequency */
|
||||
#define VARIANT_MCK (64000000ul)
|
||||
|
||||
//#define USE_LFXO // Board uses 32khz crystal for LF
|
||||
#define USE_LFRC // Board uses RC for LF
|
||||
// #define USE_LFXO // Board uses 32khz crystal for LF
|
||||
#define USE_LFRC // Board uses RC for LF
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Headers
|
||||
@ -43,28 +43,25 @@ extern "C" {
|
||||
#define NUM_ANALOG_INPUTS (2)
|
||||
#define NUM_ANALOG_OUTPUTS (0)
|
||||
|
||||
|
||||
|
||||
#define BUTTON_PIN (38) // If defined, this will be used for user button presses,
|
||||
#define BUTTON_NEED_PULLUP
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (24) // 24
|
||||
#define PIN_LED2 (-1) // Watchdog enable pin25
|
||||
// #define PIN_LED3 (-1)
|
||||
|
||||
// LEDs
|
||||
#define PIN_LED1 (24) //24
|
||||
#define PIN_LED2 (-1) //Watchdog enable pin25
|
||||
//#define PIN_LED3 (-1)
|
||||
|
||||
//#define LED_RED PIN_LED1
|
||||
//#define LED_GREEN LED_PIN
|
||||
// #define LED_RED PIN_LED1
|
||||
// #define LED_GREEN LED_PIN
|
||||
#define LED_BLUE PIN_LED1
|
||||
|
||||
//#define LED_CONN PIN_LED1
|
||||
// #define LED_CONN PIN_LED1
|
||||
#define LED_BUILTIN PIN_LED1
|
||||
|
||||
#define LED_STATE_ON 0 // State when LED is litted
|
||||
#define LED_INVERTED 1
|
||||
// Testing USB detection
|
||||
//#define NRF_APM
|
||||
// #define NRF_APM
|
||||
/*
|
||||
* Analog pins
|
||||
*/
|
||||
@ -83,10 +80,9 @@ static const uint8_t A7 = PIN_A7;
|
||||
#define ADC_RESOLUTION 14
|
||||
|
||||
// Other pins
|
||||
//#define PIN_AREF (2)
|
||||
// #define PIN_AREF (2)
|
||||
|
||||
|
||||
//static const uint8_t AREF = PIN_AREF;
|
||||
// static const uint8_t AREF = PIN_AREF;
|
||||
|
||||
/*
|
||||
* Serial interfaces
|
||||
@ -94,17 +90,14 @@ static const uint8_t A7 = PIN_A7;
|
||||
#define PIN_SERIAL1_RX (40)
|
||||
#define PIN_SERIAL1_TX (7)
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* SPI Interfaces
|
||||
*/
|
||||
#define SPI_INTERFACES_COUNT 2
|
||||
|
||||
#define PIN_SPI_MISO (8)
|
||||
#define PIN_SPI_MOSI (32 + 9)
|
||||
#define PIN_SPI_SCK (11)
|
||||
#define PIN_SPI_MISO (8)
|
||||
#define PIN_SPI_MOSI (32 + 9)
|
||||
#define PIN_SPI_SCK (11)
|
||||
|
||||
#define PIN_SPI1_MISO (23)
|
||||
#define PIN_SPI1_MOSI (21)
|
||||
@ -123,12 +116,10 @@ static const uint8_t SCK = PIN_SPI_SCK;
|
||||
#define PIN_EINK_CS (15)
|
||||
#define PIN_EINK_BUSY (16)
|
||||
#define PIN_EINK_DC (14)
|
||||
#define PIN_EINK_RES (17) //17
|
||||
#define PIN_EINK_RES (17) // 17
|
||||
#define PIN_EINK_SCLK (19)
|
||||
#define PIN_EINK_MOSI (21) // also called SDI
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Wire Interfaces
|
||||
*/
|
||||
@ -164,7 +155,6 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#define USE_SX1262
|
||||
#define SX126X_CS (12)
|
||||
#define SX126X_DIO1 (32 + 1)
|
||||
@ -175,8 +165,6 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
|
||||
|
||||
|
||||
// enables 3.3V periphery like GPS or IO Module
|
||||
// Do not toggle this for GPS power savings
|
||||
#define PIN_3V3_EN (25)
|
||||
@ -188,19 +176,17 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG
|
||||
// Therefore must be 1 to keep peripherals powered
|
||||
// Power is on the controllable 3V3_S rail
|
||||
// #define PIN_GPS_RESET (34)
|
||||
//#define HAS_GPS 1
|
||||
//#define GNSS_ATGM336H
|
||||
//#define GPS_BAUDRATE 9600
|
||||
//#undef GPS_RX_PIN
|
||||
//#undef GPS_TX_PIN
|
||||
//#define PIN_GPS_PPS 36 // Pulse per second input from the GPS
|
||||
// #define HAS_GPS 1
|
||||
// #define GNSS_ATGM336H
|
||||
// #define GPS_BAUDRATE 9600
|
||||
// #undef GPS_RX_PIN
|
||||
// #undef GPS_TX_PIN
|
||||
// #define PIN_GPS_PPS 36 // Pulse per second input from the GPS
|
||||
|
||||
#define GPS_TX_PIN PIN_SERIAL1_RX // This is for bits going TOWARDS the CPU
|
||||
#define GPS_RX_PIN PIN_SERIAL1_TX // This is for bits going TOWARDS the GPS
|
||||
|
||||
//#define GPS_THREAD_INTERVAL 50
|
||||
|
||||
|
||||
// #define GPS_THREAD_INTERVAL 50
|
||||
|
||||
// Define pin to enable GPS toggle (set GPIO to LOW) via user button triple press
|
||||
#define PIN_GPS_EN (0)
|
||||
@ -219,10 +205,6 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG
|
||||
#define VBAT_AR_INTERNAL AR_INTERNAL_3_0
|
||||
#define ADC_MULTIPLIER 1.42
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user