Browse Source
Merge pull request #1569 from IoTThinks/MCdev-Fixed-Incorrect-Release-of-RefCountedDigitalPin
Fixed RefCountedDigitalPin.h and SSD1306Display for Heltec v4
pull/1847/merge
Liam Cottle
3 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with
5 additions and
4 deletions
-
src/helpers/RefCountedDigitalPin.h
-
variants/heltec_v4/platformio.ini
-
variants/heltec_v4/target.cpp
|
|
@ -20,7 +20,10 @@ public: |
|
|
digitalWrite(_pin, _active); |
|
|
digitalWrite(_pin, _active); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void release() { |
|
|
void release() { |
|
|
|
|
|
if (_claims == 0) return; // avoid negative _claims
|
|
|
|
|
|
|
|
|
_claims--; |
|
|
_claims--; |
|
|
if (_claims == 0) { |
|
|
if (_claims == 0) { |
|
|
digitalWrite(_pin, !_active); |
|
|
digitalWrite(_pin, !_active); |
|
|
|
|
|
@ -22,7 +22,7 @@ build_flags = |
|
|
-D P_LORA_PA_TX_EN=46 ; PA CPS - GC1109 TX PA full(High) / bypass(Low) |
|
|
-D P_LORA_PA_TX_EN=46 ; PA CPS - GC1109 TX PA full(High) / bypass(Low) |
|
|
-D PIN_USER_BTN=0 |
|
|
-D PIN_USER_BTN=0 |
|
|
-D PIN_VEXT_EN=36 |
|
|
-D PIN_VEXT_EN=36 |
|
|
-D PIN_VEXT_EN_ACTIVE=LOW |
|
|
-D PIN_VEXT_EN_ACTIVE=HIGH |
|
|
-D LORA_TX_POWER=10 ;If it is configured as 10 here, the final output will be 22 dbm. |
|
|
-D LORA_TX_POWER=10 ;If it is configured as 10 here, the final output will be 22 dbm. |
|
|
-D MAX_LORA_TX_POWER=22 ; Max SX1262 output |
|
|
-D MAX_LORA_TX_POWER=22 ; Max SX1262 output |
|
|
-D SX126X_REGISTER_PATCH=1 ; Patch register 0x8B5 for improved RX |
|
|
-D SX126X_REGISTER_PATCH=1 ; Patch register 0x8B5 for improved RX |
|
|
@ -54,8 +54,6 @@ build_flags = |
|
|
-D PIN_BOARD_SDA=17 |
|
|
-D PIN_BOARD_SDA=17 |
|
|
-D PIN_BOARD_SCL=18 |
|
|
-D PIN_BOARD_SCL=18 |
|
|
-D PIN_OLED_RESET=21 |
|
|
-D PIN_OLED_RESET=21 |
|
|
-D ENV_PIN_SDA=4 |
|
|
|
|
|
-D ENV_PIN_SCL=3 |
|
|
|
|
|
build_src_filter= ${Heltec_lora32_v4.build_src_filter} |
|
|
build_src_filter= ${Heltec_lora32_v4.build_src_filter} |
|
|
lib_deps = ${Heltec_lora32_v4.lib_deps} |
|
|
lib_deps = ${Heltec_lora32_v4.lib_deps} |
|
|
|
|
|
|
|
|
|
|
|
@ -24,7 +24,7 @@ AutoDiscoverRTCClock rtc_clock(fallback_clock); |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#ifdef DISPLAY_CLASS |
|
|
#ifdef DISPLAY_CLASS |
|
|
DISPLAY_CLASS display(&(board.periph_power)); |
|
|
DISPLAY_CLASS display(NULL); |
|
|
MomentaryButton user_btn(PIN_USER_BTN, 1000, true); |
|
|
MomentaryButton user_btn(PIN_USER_BTN, 1000, true); |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
|