File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,7 +20,10 @@ class RefCountedDigitalPin {
2020 digitalWrite (_pin, _active);
2121 }
2222 }
23+
2324 void release () {
25+ if (_claims == 0 ) return ; // avoid negative _claims
26+
2427 _claims--;
2528 if (_claims == 0 ) {
2629 digitalWrite (_pin, !_active);
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ build_flags =
2222 -D P_LORA_PA_TX_EN =46 ; PA CPS - GC1109 TX PA full(High) / bypass(Low)
2323 -D PIN_USER_BTN =0
2424 -D PIN_VEXT_EN =36
25- -D PIN_VEXT_EN_ACTIVE =LOW
25+ -D PIN_VEXT_EN_ACTIVE =HIGH
2626 -D LORA_TX_POWER =10 ; If it is configured as 10 here, the final output will be 22 dbm.
2727 -D MAX_LORA_TX_POWER =22 ; Max SX1262 output
2828 -D SX126X_REGISTER_PATCH =1 ; Patch register 0x8B5 for improved RX
@@ -54,8 +54,6 @@ build_flags =
5454 -D PIN_BOARD_SDA =17
5555 -D PIN_BOARD_SCL =18
5656 -D PIN_OLED_RESET =21
57- -D ENV_PIN_SDA =4
58- -D ENV_PIN_SCL =3
5957build_src_filter = ${Heltec_lora32_v4.build_src_filter}
6058lib_deps = ${Heltec_lora32_v4.lib_deps}
6159
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ AutoDiscoverRTCClock rtc_clock(fallback_clock);
2424#endif
2525
2626#ifdef DISPLAY_CLASS
27- DISPLAY_CLASS display (&(board.periph_power) );
27+ DISPLAY_CLASS display (NULL );
2828 MomentaryButton user_btn (PIN_USER_BTN , 1000 , true );
2929#endif
3030
You can’t perform that action at this time.
0 commit comments