forked from meshtastic/firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request meshtastic#3544 from garethhcoleman/unphone
New device unPhone using HX8357D LCD and XPT2046 touchscreen
- Loading branch information
Showing
8 changed files
with
218 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[env:unphone] | ||
;build_type = debug ; to make it possible to step through our jtag debugger | ||
extends = esp32s3_base | ||
board_level = extra | ||
board = unphone9 | ||
upload_speed = 921600 | ||
monitor_speed = 115200 | ||
monitor_filters = esp32_exception_decoder | ||
|
||
build_flags = ${esp32_base.build_flags} | ||
-D UNPHONE | ||
-D BOARD_HAS_PSRAM | ||
-I variants/unphone | ||
|
||
lib_deps = ${esp32s3_base.lib_deps} | ||
lovyan03/LovyanGFX@^1.1.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#define SPI_SCK 39 | ||
#define SPI_MOSI 40 | ||
#define SPI_MISO 41 | ||
|
||
// We use the RFM95W LoRa module | ||
#define USE_RF95 | ||
#define LORA_SCK SPI_SCK | ||
#define LORA_MOSI SPI_MOSI | ||
#define LORA_MISO SPI_MISO | ||
#define LORA_CS 44 | ||
#define LORA_DIO0 10 // AKA LORA_IRQ | ||
#define LORA_RESET 42 | ||
#define LORA_DIO1 11 | ||
#define LORA_DIO2 RADIOLIB_NC // Not really used | ||
|
||
// HX8357 TFT LCD | ||
#define HX8357_CS 48 | ||
#define HX8357_RS 47 // AKA DC | ||
#define HX8357_RESET 46 | ||
#define HX8357_SCK SPI_SCK | ||
#define HX8357_MOSI SPI_MOSI | ||
#define HX8357_MISO SPI_MISO | ||
#define HX8357_BUSY -1 | ||
#define HX8357_SPI_HOST SPI2_HOST | ||
#define SPI_FREQUENCY 40000000 | ||
#define SPI_READ_FREQUENCY 16000000 | ||
#define TFT_HEIGHT 480 | ||
#define TFT_WIDTH 320 | ||
#define TFT_OFFSET_X 0 | ||
#define TFT_OFFSET_Y 0 | ||
#define TFT_OFFSET_ROTATION 6 // the unPhone's screen is wired unusually, 0 is typical value here | ||
#define TFT_INVERT false | ||
#define SCREEN_ROTATE true | ||
#define SCREEN_TRANSITION_FRAMERATE 5 | ||
|
||
#define HAS_TOUCHSCREEN 1 | ||
#define USE_XPT2046 1 | ||
#define TOUCH_CS 38 | ||
|
||
#define HAS_GPS 0 // the unphone doesn't have a gps module | ||
#undef GPS_RX_PIN | ||
#undef GPS_TX_PIN | ||
|
||
#define HAS_SDCARD 1 | ||
#define SDCARD_CS 43 | ||
|
||
#define LED_PIN 13 // the red part of the RGB LED | ||
#define LED_INVERTED 1 | ||
|
||
#define BUTTON_PIN 21 // Button 3 - square - top button in landscape mode | ||
#define BUTTON_NEED_PULLUP // we do need a helping hand up | ||
|
||
#define I2C_SDA 3 // I2C pins for this board | ||
#define I2C_SCL 4 | ||
|
||
// ratio of voltage divider = 3.20 (R1=100k, R2=220k) | ||
// #define ADC_MULTIPLIER 3.2 | ||
|
||
// #define BATTERY_PIN 13 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage | ||
// #define ADC_CHANNEL ADC2_GPIO13_CHANNEL | ||
// #define BAT_MEASURE_ADC_UNIT 2 |