mirror of
https://github.com/markqvist/RNode_Firmware.git
synced 2025-05-03 15:14:51 -04:00
Merge pull request #35 from mrmx/lora32_v10
Initial support for TTGO LORA SX1278 ESP32 0.96 OLED 32Mbit (4MB) 433Mhz v1.0
This commit is contained in:
commit
023f6fa1e3
5 changed files with 71 additions and 5 deletions
13
Display.h
13
Display.h
|
@ -26,7 +26,7 @@
|
|||
#define DISP_RST 13
|
||||
#define DISP_ADDR 0x3D
|
||||
// #define DISP_ADDR 0x3C
|
||||
#elif BOARD_MODEL == BOARD_HELTEC32_V2
|
||||
#elif BOARD_MODEL == BOARD_HELTEC32_V2 || BOARD_MODEL == BOARD_LORA32_V1_0
|
||||
#define DISP_RST 16
|
||||
#define DISP_ADDR 0x3C
|
||||
#define SCL_OLED 15
|
||||
|
@ -87,7 +87,7 @@ void set_contrast(Adafruit_SSD1306 *display, uint8_t contrast) {
|
|||
|
||||
bool display_init() {
|
||||
#if HAS_DISPLAY
|
||||
#if BOARD_MODEL == BOARD_RNODE_NG_20 || BOARD_MODEL == BOARD_LORA32_V2_0
|
||||
#if BOARD_MODEL == BOARD_RNODE_NG_20 || BOARD_MODEL == BOARD_LORA32_V2_0 || BOARD_LORA32_V1_0
|
||||
int pin_display_en = 16;
|
||||
digitalWrite(pin_display_en, LOW);
|
||||
delay(50);
|
||||
|
@ -95,7 +95,11 @@ bool display_init() {
|
|||
#elif BOARD_MODEL == BOARD_HELTEC32_V2
|
||||
Wire.begin(SDA_OLED, SCL_OLED);
|
||||
#endif
|
||||
|
||||
|
||||
#if BOARD_MODEL == BOARD_LORA32_V1_0
|
||||
Wire.begin(SDA_OLED, SCL_OLED);
|
||||
#endif
|
||||
|
||||
if(!display.begin(SSD1306_SWITCHCAPVCC, DISP_ADDR)) {
|
||||
return false;
|
||||
} else {
|
||||
|
@ -106,6 +110,9 @@ bool display_init() {
|
|||
#elif BOARD_MODEL == BOARD_RNODE_NG_21
|
||||
disp_mode = DISP_MODE_PORTRAIT;
|
||||
display.setRotation(3);
|
||||
#elif BOARD_MODEL == BOARD_LORA32_V1_0
|
||||
disp_mode = DISP_MODE_PORTRAIT;
|
||||
display.setRotation(3);
|
||||
#elif BOARD_MODEL == BOARD_LORA32_V2_0
|
||||
disp_mode = DISP_MODE_PORTRAIT;
|
||||
display.setRotation(3);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue