mirror of
https://github.com/markqvist/RNode_Firmware.git
synced 2024-10-01 03:15:39 -04:00
Fix display init for Heltec
This commit is contained in:
parent
64c6290677
commit
f65585a134
10
Display.h
10
Display.h
@ -87,16 +87,18 @@ void set_contrast(Adafruit_SSD1306 *display, uint8_t contrast) {
|
|||||||
|
|
||||||
bool display_init() {
|
bool display_init() {
|
||||||
#if HAS_DISPLAY
|
#if HAS_DISPLAY
|
||||||
#if BOARD_MODEL == BOARD_RNODE_NG_20 || BOARD_MODEL == BOARD_LORA32_V2_0 || BOARD_LORA32_V1_0
|
#if BOARD_MODEL == BOARD_RNODE_NG_20 || BOARD_MODEL == BOARD_LORA32_V2_0
|
||||||
int pin_display_en = 16;
|
int pin_display_en = 16;
|
||||||
digitalWrite(pin_display_en, LOW);
|
digitalWrite(pin_display_en, LOW);
|
||||||
delay(50);
|
delay(50);
|
||||||
digitalWrite(pin_display_en, HIGH);
|
digitalWrite(pin_display_en, HIGH);
|
||||||
#elif BOARD_MODEL == BOARD_HELTEC32_V2
|
#elif BOARD_MODEL == BOARD_HELTEC32_V2
|
||||||
Wire.begin(SDA_OLED, SCL_OLED);
|
Wire.begin(SDA_OLED, SCL_OLED);
|
||||||
#endif
|
#elif BOARD_MODEL == BOARD_LORA32_V1_0
|
||||||
|
int pin_display_en = 16;
|
||||||
#if BOARD_MODEL == BOARD_LORA32_V1_0
|
digitalWrite(pin_display_en, LOW);
|
||||||
|
delay(50);
|
||||||
|
digitalWrite(pin_display_en, HIGH);
|
||||||
Wire.begin(SDA_OLED, SCL_OLED);
|
Wire.begin(SDA_OLED, SCL_OLED);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user