Povilas Balzaravičius
18 hours ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with
6 additions and
7 deletions
-
variants/muziworks_r1_neo/R1NeoBoard.cpp
-
variants/muziworks_r1_neo/R1NeoBoard.h
-
variants/muziworks_r1_neo/platformio.ini
-
variants/muziworks_r1_neo/variant.h
|
|
|
@ -47,8 +47,8 @@ void R1NeoBoard::begin() { |
|
|
|
// button is active high and passed through from I/O controller
|
|
|
|
pinMode(PIN_USER_BTN, INPUT); |
|
|
|
|
|
|
|
pinMode(PIN_BUZZER, OUTPUT); |
|
|
|
digitalWrite(PIN_BUZZER, LOW); |
|
|
|
pinMode(3, OUTPUT); // buzzer drive pin (P0.03) - pull low to avoid power draw, beeper is disabled
|
|
|
|
digitalWrite(3, LOW); |
|
|
|
|
|
|
|
// battery pins
|
|
|
|
pinMode(PIN_BAT_CHG, INPUT); |
|
|
|
|
|
|
|
@ -27,14 +27,14 @@ public: |
|
|
|
#if defined(P_LORA_TX_LED) |
|
|
|
void onBeforeTransmit() override { |
|
|
|
digitalWrite(P_LORA_TX_LED, HIGH); // turn TX LED on
|
|
|
|
#if defined(LED_BLUE) |
|
|
|
#if defined(LED_BLUE) && LED_BLUE >= 0 |
|
|
|
// turn off that annoying blue LED before transmitting
|
|
|
|
digitalWrite(LED_BLUE, LOW); |
|
|
|
#endif |
|
|
|
} |
|
|
|
void onAfterTransmit() override { |
|
|
|
digitalWrite(P_LORA_TX_LED, LOW); // turn TX LED off
|
|
|
|
#if defined(LED_BLUE) |
|
|
|
#if defined(LED_BLUE) && LED_BLUE >= 0 |
|
|
|
// do it after transmitting too, just in case
|
|
|
|
digitalWrite(LED_BLUE, LOW); |
|
|
|
#endif |
|
|
|
|
|
|
|
@ -13,7 +13,6 @@ build_flags = ${nrf52_base.build_flags} |
|
|
|
-D LORA_TX_POWER=22 |
|
|
|
-D SX126X_CURRENT_LIMIT=140 |
|
|
|
-D SX126X_RX_BOOSTED_GAIN=1 |
|
|
|
-D PIN_BUZZER=3 |
|
|
|
-D PIN_USER_BTN=26 |
|
|
|
-D USER_BTN_PRESSED=HIGH |
|
|
|
-D PIN_GPS_TX=25 |
|
|
|
|
|
|
|
@ -80,7 +80,7 @@ extern "C" |
|
|
|
|
|
|
|
/* LEDs */ |
|
|
|
#define LED_GREEN (36) // P1.04 (28) GRN_LED_RAK
|
|
|
|
#define LED_BLUE (28) // P0.28 (31) BLU_LED_RAK
|
|
|
|
#define LED_BLUE (-1) // Disable annoying flashing caused by Bluefruit
|
|
|
|
|
|
|
|
#define LED_BUILTIN (0xFF) |
|
|
|
|
|
|
|
@ -94,7 +94,7 @@ extern "C" |
|
|
|
#define PIN_USER_BTN (26) |
|
|
|
|
|
|
|
/* Buzzer */ |
|
|
|
#define PIN_BUZZER (3) |
|
|
|
// #define PIN_BUZZER (3) // Disabled: beeper is undesirable on this device
|
|
|
|
|
|
|
|
/* Analog pins */ |
|
|
|
// Arduino makes me angry
|
|
|
|
|