@geastack/targets 0.1.99 → 0.1.100-mosaico-pins.1
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.
package/build-config.json
CHANGED
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"renderer.subtreeRevealChecks",
|
|
16
16
|
"renderer.recordInlinePositions",
|
|
17
17
|
"diagnostics.performanceCounters",
|
|
18
|
-
"diagnostics.frameTiming"
|
|
18
|
+
"diagnostics.frameTiming",
|
|
19
|
+
"renderer.bandedUi"
|
|
19
20
|
],
|
|
20
21
|
"defaults": {
|
|
21
22
|
"ui": {
|
|
@@ -29,6 +30,9 @@
|
|
|
29
30
|
"storeRelowering": true,
|
|
30
31
|
"moduleGraph": "auto",
|
|
31
32
|
"allowAny": false
|
|
33
|
+
},
|
|
34
|
+
"renderer": {
|
|
35
|
+
"bandedUi": false
|
|
32
36
|
}
|
|
33
37
|
}
|
|
34
38
|
},
|
|
@@ -41,7 +45,8 @@
|
|
|
41
45
|
"compiler.translationUnits",
|
|
42
46
|
"compiler.storeRelowering",
|
|
43
47
|
"compiler.moduleGraph",
|
|
44
|
-
"compiler.allowAny"
|
|
48
|
+
"compiler.allowAny",
|
|
49
|
+
"renderer.bandedUi"
|
|
45
50
|
],
|
|
46
51
|
"defaults": {
|
|
47
52
|
"ui": {
|
|
@@ -55,6 +60,9 @@
|
|
|
55
60
|
"storeRelowering": true,
|
|
56
61
|
"moduleGraph": "auto",
|
|
57
62
|
"allowAny": false
|
|
63
|
+
},
|
|
64
|
+
"renderer": {
|
|
65
|
+
"bandedUi": false
|
|
58
66
|
}
|
|
59
67
|
}
|
|
60
68
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geastack/targets",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.100-mosaico-pins.1",
|
|
4
4
|
"description": "Native embedded build targets (ESP32-IDF, RP2350) for geastack apps: board sources, target catalog, and CMake glue driven by the gea CLI.",
|
|
5
5
|
"license": "GPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -34,10 +34,6 @@ set(GEA_BOARD_EXTRA_COMPILE_DEFINITIONS
|
|
|
34
34
|
GEA_BOARD_USB_CONSOLE=1
|
|
35
35
|
# `gea flash` installs apps through the running app (usbAppUpdate).
|
|
36
36
|
GEA_DEVICE_CONTROL_USB_OTA=1
|
|
37
|
-
# Framebuffer-free retained UI: each dirty band is rendered straight into the
|
|
38
|
-
# internal-RAM DMA staging chunk and streamed while the next band renders,
|
|
39
|
-
# instead of writing the PSRAM framebuffer and reading it back to flush.
|
|
40
|
-
GEA_EMBEDDED_DISPLAY_BANDED_UI=1
|
|
41
37
|
GEA_EMBEDDED_CO5300_MOSAICO_INIT=1
|
|
42
38
|
GEA_EMBEDDED_CO5300_PANEL_X_GAP=0
|
|
43
39
|
GEA_EMBEDDED_CO5300_PANEL_Y_GAP=0
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
// Override through the Mosaico board's package.json defines. Defaults retain
|
|
4
|
+
// the original H1 12 -> H2 12 and H1 11 <- H2 11 side-header harness.
|
|
5
|
+
#ifndef GEA_MOSAICO_PEER_LEFT_TX_GPIO
|
|
6
|
+
#define GEA_MOSAICO_PEER_LEFT_TX_GPIO 15
|
|
7
|
+
#endif
|
|
8
|
+
#ifndef GEA_MOSAICO_PEER_LEFT_RX_GPIO
|
|
9
|
+
#define GEA_MOSAICO_PEER_LEFT_RX_GPIO 4
|
|
10
|
+
#endif
|
|
11
|
+
#ifndef GEA_MOSAICO_PEER_RIGHT_TX_GPIO
|
|
12
|
+
#define GEA_MOSAICO_PEER_RIGHT_TX_GPIO 5
|
|
13
|
+
#endif
|
|
14
|
+
#ifndef GEA_MOSAICO_PEER_RIGHT_RX_GPIO
|
|
15
|
+
#define GEA_MOSAICO_PEER_RIGHT_RX_GPIO 38
|
|
16
|
+
#endif
|
|
17
|
+
|
|
18
|
+
namespace gea::platform::board::peer {
|
|
19
|
+
struct PinPair {
|
|
20
|
+
int tx;
|
|
21
|
+
int rx;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
inline constexpr PinPair left{GEA_MOSAICO_PEER_LEFT_TX_GPIO,
|
|
25
|
+
GEA_MOSAICO_PEER_LEFT_RX_GPIO};
|
|
26
|
+
inline constexpr PinPair right{GEA_MOSAICO_PEER_RIGHT_TX_GPIO,
|
|
27
|
+
GEA_MOSAICO_PEER_RIGHT_RX_GPIO};
|
|
28
|
+
|
|
29
|
+
// Only unclaimed V1.2 expansion GPIOs. In this target GPIO0/1 are the unused
|
|
30
|
+
// expansion I2C bus; the onboard touch/sensors use GPIO56/3. Exclude the
|
|
31
|
+
// codec, display, NAND, power controls, USB/JTAG and UART0 console pins.
|
|
32
|
+
constexpr bool isExpansionGpio(int pin) {
|
|
33
|
+
switch (pin) {
|
|
34
|
+
case 0:
|
|
35
|
+
case 1:
|
|
36
|
+
case 4:
|
|
37
|
+
case 5:
|
|
38
|
+
case 10:
|
|
39
|
+
case 11:
|
|
40
|
+
case 12:
|
|
41
|
+
case 13:
|
|
42
|
+
case 14:
|
|
43
|
+
case 15:
|
|
44
|
+
case 16:
|
|
45
|
+
case 17:
|
|
46
|
+
case 18:
|
|
47
|
+
case 19:
|
|
48
|
+
case 38:
|
|
49
|
+
case 39:
|
|
50
|
+
case 46:
|
|
51
|
+
case 47:
|
|
52
|
+
case 48:
|
|
53
|
+
case 53:
|
|
54
|
+
case 55:
|
|
55
|
+
return true;
|
|
56
|
+
default:
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
static_assert(isExpansionGpio(left.tx) && isExpansionGpio(left.rx) &&
|
|
62
|
+
isExpansionGpio(right.tx) && isExpansionGpio(right.rx),
|
|
63
|
+
"Mosaico peer UART pins must be unclaimed expansion GPIOs");
|
|
64
|
+
static_assert(left.tx != left.rx && left.tx != right.tx &&
|
|
65
|
+
left.tx != right.rx && left.rx != right.tx &&
|
|
66
|
+
left.rx != right.rx && right.tx != right.rx,
|
|
67
|
+
"Mosaico peer UART requires four distinct GPIOs");
|
|
68
|
+
} // namespace gea::platform::board::peer
|
|
@@ -3,16 +3,19 @@
|
|
|
3
3
|
#include "esp_err.h"
|
|
4
4
|
#include "freertos/FreeRTOS.h"
|
|
5
5
|
#include "mosaico_peer_uart.h"
|
|
6
|
+
#include "mosaico_peer_uart_pins.h"
|
|
6
7
|
#include <array>
|
|
7
8
|
namespace {
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
// these signal contacts plus GND; this does not join output power rails.
|
|
9
|
+
// The board validates configurable signal contacts before either UART opens.
|
|
10
|
+
// Adjacent boards also need common ground; never join output power rails.
|
|
11
11
|
struct Pins {
|
|
12
12
|
uart_port_t uart;
|
|
13
13
|
int tx, rx;
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
namespace peer = gea::platform::board::peer;
|
|
16
|
+
constexpr std::array<Pins, 2> pins{
|
|
17
|
+
{{UART_NUM_1, peer::left.tx, peer::left.rx},
|
|
18
|
+
{UART_NUM_2, peer::right.tx, peer::right.rx}}};
|
|
16
19
|
bool opened = false;
|
|
17
20
|
} // namespace
|
|
18
21
|
extern "C" bool gea_mosaico_peer_uart_open(uint32_t baud) {
|