WIP: t-echo display code started

This commit is contained in:
Jeremy 2024-09-16 15:21:07 -04:00
parent 2cdf2951e6
commit 3e7c8f1c29
4 changed files with 25 additions and 3 deletions

View File

@ -639,7 +639,8 @@
#define EEPROM_OFFSET EEPROM_SIZE-EEPROM_RESERVED #define EEPROM_OFFSET EEPROM_SIZE-EEPROM_RESERVED
//#define HAS_EEPROM true //#define HAS_EEPROM true
//#define HAS_SD true //#define HAS_SD true
//#define HAS_DISPLAY true #define HAS_DISPLAY true
#define DISPLAY_MODEL GxEPD2_154_D67
//#define HAS_CONSOLE true //#define HAS_CONSOLE true
//#define HAS_TXCO true //#define HAS_TXCO true
//#define DISPLAY EINK_BW //#define DISPLAY EINK_BW
@ -686,6 +687,9 @@
const int pin_disp_reset = 2; const int pin_disp_reset = 2;
const int pin_disp_busy = 3; const int pin_disp_busy = 3;
const int pin_disp_en = 43; const int pin_disp_en = 43;
const int pin_disp_sck = 31;
const int pin_disp_mosi = 29;
const int pin_led_rx = LED_BLUE; const int pin_led_rx = LED_BLUE;
const int pin_led_tx = LED_RED; const int pin_led_tx = LED_RED;

View File

@ -231,6 +231,24 @@ bool display_init() {
delay(50); delay(50);
digitalWrite(pin_display_en, HIGH); digitalWrite(pin_display_en, HIGH);
Wire.begin(SDA_OLED, SCL_OLED); Wire.begin(SDA_OLED, SCL_OLED);
#elif BOARD_MODEL == BOARD_TECHO
#if DISPLAY == OLED
#elif DISPLAY == EINK_BW || DISPLAY == EINK_3C
pinMode(pin_disp_en, INPUT_PULLUP);
digitalWrite(pin_disp_en, HIGH);
SPIClass displaySPI();
displaySPI.begin(pin_display_sck, pin_display_miso, pin_display_mosi, pin_display_cs); // SCLK, MISO, MOSI, SS
display.init(0, true, 10, false, displaySPI, SPISettings(4000000, MSBFIRST, SPI_MODE0));
display.setPartialWindow(0, 0, DISP_W, DISP_H);
// Because refreshing this display can take some time, sometimes serial
// commands will be missed. Therefore, during periods where the device is
// waiting for the display to update, it will poll the serial buffer to
// check for any commands from the host.
display.epd2.setBusyCallback(busyCallback);
#endif
#elif BOARD_MODEL == BOARD_RAK4631 #elif BOARD_MODEL == BOARD_RAK4631
#if DISPLAY == OLED #if DISPLAY == OLED
#elif DISPLAY == EINK_BW || DISPLAY == EINK_3C #elif DISPLAY == EINK_BW || DISPLAY == EINK_3C

View File

@ -408,7 +408,7 @@ const unsigned char bm_dot_sqr [] PROGMEM = {
0x80, 0x00, 0x40, 0x00, 0x00, 0x00, 0xaa, 0xd5, 0x40 0x80, 0x00, 0x40, 0x00, 0x00, 0x00, 0xaa, 0xd5, 0x40
}; };
#elif DISP_H == 122 #elif (DISP_H == 122 || DISP_H == 200)
// use 122px wide graphics // use 122px wide graphics
const unsigned char bm_bt [] PROGMEM = { const unsigned char bm_bt [] PROGMEM = {

View File

@ -136,7 +136,7 @@ upload-techo:
arduino-cli upload -p $(or $(port), /dev/ttyACM0) --fqbn adafruit:nrf52:pca10056 arduino-cli upload -p $(or $(port), /dev/ttyACM0) --fqbn adafruit:nrf52:pca10056
unzip -o build/adafruit.nrf52.pca10056/RNode_Firmware_CE.ino.zip -d build/adafruit.nrf52.pca10056 unzip -o build/adafruit.nrf52.pca10056/RNode_Firmware_CE.ino.zip -d build/adafruit.nrf52.pca10056
#rnodeconf $(or $(port), /dev/ttyACM0) --firmware-hash $$(sha256sum ./build/adafruit.nrf52.pca10056/RNode_Firmware_CE.ino.bin | grep -o '^\S*') #rnodeconf $(or $(port), /dev/ttyACM0) --firmware-hash $$(sha256sum ./build/adafruit.nrf52.pca10056/RNode_Firmware_CE.ino.bin | grep -o '^\S*')
../Reticulum/RNS/Utilities/rnodeconf.py $(or $(port), /dev/ttyACM0) --firmware-hash $$(sha256sum ./build/adafruit.nrf52.pca10056/RNode_Firmware_CE.ino.bin | grep -o '^\S*') ../Reticulum/RNS/Utilities/rnodeconf.py $(or $(port), /dev/ttyACM0) --firmware-hash $$(shasum -a 256 ./build/adafruit.nrf52.pca10056/RNode_Firmware_CE.ino.bin | grep -o '^\S*')
upload-lora32_v10: upload-lora32_v10:
arduino-cli upload -p $(or $(port), /dev/ttyUSB0) --fqbn esp32:esp32:ttgo-lora32 arduino-cli upload -p $(or $(port), /dev/ttyUSB0) --fqbn esp32:esp32:ttgo-lora32