@geastack/targets 0.1.79 → 0.1.80

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,6 +22,13 @@ namespace {
22
22
  constexpr const char *kTag = "launcher_button";
23
23
  constexpr gpio_num_t kGpio = gea::platform::board::launcherButton.pin;
24
24
  constexpr int kActiveLevel = gea::platform::board::launcherButton.activeLevel;
25
+ // A board with no button leaves the pin GPIO_NUM_NC (-1); `1ULL << kGpio` on
26
+ // that constant is a negative shift the compiler rejects even though start()
27
+ // returns before using it, so the mask is formed behind a branch.
28
+ constexpr std::uint64_t pinMask(gpio_num_t pin)
29
+ {
30
+ return pin < 0 ? 0ULL : (1ULL << static_cast<unsigned>(pin));
31
+ }
25
32
  constexpr int kDebounceMs = 50;
26
33
  constexpr int kPollMs = 25;
27
34
  constexpr int kLongPressMs = 800;
@@ -78,7 +85,7 @@ public:
78
85
  gpio_reset_pin(kGpio);
79
86
 
80
87
  gpio_config_t config = {
81
- .pin_bit_mask = 1ULL << kGpio,
88
+ .pin_bit_mask = pinMask(kGpio),
82
89
  .mode = GPIO_MODE_INPUT,
83
90
  .pull_up_en = GPIO_PULLUP_ENABLE,
84
91
  .pull_down_en = GPIO_PULLDOWN_DISABLE,
@@ -0,0 +1,61 @@
1
+ {
2
+ "id": "esp32-s3-waveshare-touch-lcd-7",
3
+ "extends": "esp32-s3",
4
+ "adapter": "esp32-idf",
5
+ "mcu": "esp32s3",
6
+
7
+ "_comment": "Waveshare ESP32-S3-Touch-LCD-7: an ESP32-S3-WROOM-1-N16R8 (16MB quad flash, 8MB octal PSRAM) behind a 7-inch 800x480 parallel RGB panel with a GT911 touch controller. Pins and timings are the vendor's ESP-IDF demo (examples/ESP-IDF/09_lvgl_v9_demo/components/waveshare_rgb_lcd_port.h). Composed from the chip catalog; not yet verified on hardware.",
8
+
9
+ "flashSize": "16MB",
10
+
11
+ "_console": "The board has no USB-UART bridge on its USB-C port: that is the S3's native USB-Serial/JTAG, which is the base target's default. UART0 (TX GPIO43 / RX GPIO44) is also brought out on the header.",
12
+
13
+ "_psram": "N16R8 is 8MB octal PSRAM; the RGB panel's framebuffer (800x480x2 = 768KB, plus a back buffer) lives there.",
14
+ "psram": { "mode": "octal", "speed": 80 },
15
+
16
+ "buses": { "i2c": { "sda": 8, "scl": 9 } },
17
+
18
+ "chips": {
19
+ "display": {
20
+ "driver": "rgb_panel",
21
+ "interface": "rgb",
22
+ "width": 800,
23
+ "height": 480,
24
+ "pclkHz": 16000000,
25
+ "hsyncPulseWidth": 4, "hsyncBackPorch": 8, "hsyncFrontPorch": 8,
26
+ "vsyncPulseWidth": 4, "vsyncBackPorch": 8, "vsyncFrontPorch": 8,
27
+ "pclkActiveNeg": true,
28
+ "_pins": "data0-4 = B3-B7, data5-10 = G2-G7, data11-15 = R3-R7. The backlight is EXIO2 on the CH422G, so no GPIO is named here.",
29
+ "pins": {
30
+ "de": 5, "hsync": 46, "vsync": 3, "pclk": 7,
31
+ "data0": 14, "data1": 38, "data2": 18, "data3": 17, "data4": 10,
32
+ "data5": 39, "data6": 0, "data7": 45, "data8": 48, "data9": 47, "data10": 21,
33
+ "data11": 1, "data12": 2, "data13": 42, "data14": 41, "data15": 40
34
+ }
35
+ },
36
+ "touch": {
37
+ "driver": "gt911",
38
+ "interface": "i2c",
39
+ "_pins": "Reset is EXIO1 on the CH422G; INT is GPIO4, which the binding also drives low across reset to fix the controller's I2C address at 0x5d.",
40
+ "pins": { "interrupt": 4 }
41
+ },
42
+ "expander": {
43
+ "driver": "ch422g",
44
+ "interface": "i2c",
45
+ "_outputs": "EXIO1 touch reset, EXIO2 backlight, EXIO3 panel reset, EXIO4 microSD chip-select, EXIO5 USB/CAN switch. initialOutputs 0x1e matches the vendor demo's steady state: resets released, backlight on, card deselected, USB selected.",
46
+ "initialOutputs": 30,
47
+ "outputs": { "touchReset": 1, "backlight": 2, "displayReset": 3 }
48
+ }
49
+ },
50
+
51
+ "_controls": "The BOOT button is GPIO0, which the RGB bus uses as data6 (G3) on this board, so there is no launcher button.",
52
+
53
+ "partitions": {
54
+ "nvs": { "type": "data", "subtype": "nvs", "offset": "0x9000", "size": "0x6000" },
55
+ "otadata": { "type": "data", "subtype": "ota", "offset": "0xf000", "size": "0x2000" },
56
+ "phy_init": { "type": "data", "subtype": "phy", "offset": "0x11000", "size": "0x1000" },
57
+ "ota_0": { "type": "app", "subtype": "ota_0", "offset": "0x20000", "size": "0x600000" },
58
+ "ota_1": { "type": "app", "subtype": "ota_1", "offset": "0x620000","size": "0x600000" },
59
+ "storage": { "type": "data", "subtype": "spiffs", "offset": "0xC20000","size": "0x3E0000" }
60
+ }
61
+ }
package/targets.json CHANGED
@@ -19,6 +19,16 @@
19
19
  "esptoolChip": "esp32s3",
20
20
  "ipcTaskStackSize": "4096"
21
21
  },
22
+ "esp32-s3-waveshare-touch-lcd-7": {
23
+ "adapter": "esp32-idf",
24
+ "targetPath": "targets/esp32-s3-touch-amoled-2.06",
25
+ "definition": "targets/esp32-s3-waveshare-touch-lcd-7.json",
26
+ "flashSize": "16MB",
27
+ "appPlatform": "esp32",
28
+ "idfTarget": "esp32s3",
29
+ "esptoolChip": "esp32s3",
30
+ "ipcTaskStackSize": "4096"
31
+ },
22
32
  "esp32-s3-touch-amoled-2.06": {
23
33
  "adapter": "esp32-idf",
24
34
  "targetPath": "targets/esp32-s3-touch-amoled-2.06",