Skip to content

Commit ef11af2

Browse files
authoredMar 21, 2025··
Update for Haute42|COSMOX Lite and Ultra (#1315)
Update for Haute42|COSMOX Lite and Ultra to give both a board defined screen layout
1 parent e105c85 commit ef11af2

File tree

2 files changed

+58
-4
lines changed

2 files changed

+58
-4
lines changed
 

‎configs/Haute42COSMOXMLite/BoardConfig.h

+29-2
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,38 @@
108108
#define I2C0_ENABLED 1
109109
#define I2C0_PIN_SDA 0
110110
#define I2C0_PIN_SCL 1
111-
#define BUTTON_LAYOUT BUTTON_LAYOUT_STICKLESS
112-
#define BUTTON_LAYOUT_RIGHT BUTTON_LAYOUT_STICKLESSB
111+
#define BUTTON_LAYOUT BUTTON_LAYOUT_BOARD_DEFINED_A
112+
#define BUTTON_LAYOUT_RIGHT BUTTON_LAYOUT_BOARD_DEFINED_B
113113
#define SPLASH_MODE SPLASH_MODE_STATIC
114114
#define SPLASH_DURATION 3000
115115

116+
#define DEFAULT_BOARD_LAYOUT_A {\
117+
{GP_ELEMENT_PIN_BUTTON, {47, 19, 4, 4, 1, 1, 27, GP_SHAPE_ELLIPSE}},\
118+
{GP_ELEMENT_PIN_BUTTON, {32, 27, 4, 4, 1, 1, 5, GP_SHAPE_ELLIPSE}},\
119+
{GP_ELEMENT_PIN_BUTTON, {42, 27, 4, 4, 1, 1, 3, GP_SHAPE_ELLIPSE}},\
120+
{GP_ELEMENT_PIN_BUTTON, {50, 32, 4, 4, 1, 1, 4, GP_SHAPE_ELLIPSE}},\
121+
{GP_ELEMENT_PIN_BUTTON, {64, 17, 4, 4, 1, 1, 18, GP_SHAPE_ELLIPSE}},\
122+
{GP_ELEMENT_PIN_BUTTON, {54, 49, 5, 5, 1, 1, 2, GP_SHAPE_ELLIPSE}},\
123+
{GP_ELEMENT_PIN_BUTTON, {42, 46, 4, 4, 1, 1, 26, GP_SHAPE_ELLIPSE}},\
124+
{GP_ELEMENT_PIN_BUTTON, {77, 15, 2, 2, 1, 1, 14, GP_SHAPE_ELLIPSE}},\
125+
{GP_ELEMENT_PIN_BUTTON, {84, 15, 2, 2, 1, 1, 21, GP_SHAPE_ELLIPSE}},\
126+
{GP_ELEMENT_PIN_BUTTON, {91, 15, 2, 2, 1, 1, 20, GP_SHAPE_ELLIPSE}},\
127+
{GP_ELEMENT_PIN_BUTTON, {98, 15, 2, 2, 1, 1, 16, GP_SHAPE_ELLIPSE}},\
128+
{GP_ELEMENT_PIN_BUTTON, {105, 15, 2, 2, 1, 1, 17, GP_SHAPE_ELLIPSE}}\
129+
}
130+
131+
#define DEFAULT_BOARD_LAYOUT_B {\
132+
{GP_ELEMENT_PIN_BUTTON, {59, 27, 4, 4, 1, 1, 10, GP_SHAPE_ELLIPSE}},\
133+
{GP_ELEMENT_PIN_BUTTON, {69, 25, 4, 4, 1, 1, 11, GP_SHAPE_ELLIPSE}},\
134+
{GP_ELEMENT_PIN_BUTTON, {79, 25, 4, 4, 1, 1, 12, GP_SHAPE_ELLIPSE}},\
135+
{GP_ELEMENT_PIN_BUTTON, {89, 27, 4, 4, 1, 1, 13, GP_SHAPE_ELLIPSE}},\
136+
{GP_ELEMENT_PIN_BUTTON, {59, 37, 4, 4, 1, 1, 6, GP_SHAPE_ELLIPSE}},\
137+
{GP_ELEMENT_PIN_BUTTON, {69, 35, 4, 4, 1, 1, 7, GP_SHAPE_ELLIPSE}},\
138+
{GP_ELEMENT_PIN_BUTTON, {79, 35, 4, 4, 1, 1, 8, GP_SHAPE_ELLIPSE}},\
139+
{GP_ELEMENT_PIN_BUTTON, {89, 37, 4, 4, 1, 1, 9, GP_SHAPE_ELLIPSE}},\
140+
{GP_ELEMENT_PIN_BUTTON, {66, 45, 4, 4, 1, 1, 19, GP_SHAPE_ELLIPSE}}\
141+
}
142+
116143
// Additional Button Support
117144
#define GPIO_PIN_27 GpioAction::BUTTON_PRESS_UP
118145
#define GPIO_PIN_26 GpioAction::BUTTON_PRESS_L3

‎configs/Haute42COSMOXMUltra/BoardConfig.h

+29-2
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,38 @@
108108
#define I2C0_ENABLED 1
109109
#define I2C0_PIN_SDA 0
110110
#define I2C0_PIN_SCL 1
111-
#define BUTTON_LAYOUT BUTTON_LAYOUT_STICKLESS
112-
#define BUTTON_LAYOUT_RIGHT BUTTON_LAYOUT_STICKLESSB
111+
#define BUTTON_LAYOUT BUTTON_LAYOUT_BOARD_DEFINED_A
112+
#define BUTTON_LAYOUT_RIGHT BUTTON_LAYOUT_BOARD_DEFINED_B
113113
#define SPLASH_MODE SPLASH_MODE_STATIC
114114
#define SPLASH_DURATION 3000
115115

116+
#define DEFAULT_BOARD_LAYOUT_A {\
117+
{GP_ELEMENT_PIN_BUTTON, {47, 19, 4, 4, 1, 1, 27, GP_SHAPE_ELLIPSE}},\
118+
{GP_ELEMENT_PIN_BUTTON, {32, 27, 4, 4, 1, 1, 5, GP_SHAPE_ELLIPSE}},\
119+
{GP_ELEMENT_PIN_BUTTON, {42, 27, 4, 4, 1, 1, 3, GP_SHAPE_ELLIPSE}},\
120+
{GP_ELEMENT_PIN_BUTTON, {50, 32, 4, 4, 1, 1, 4, GP_SHAPE_ELLIPSE}},\
121+
{GP_ELEMENT_PIN_BUTTON, {64, 17, 4, 4, 1, 1, 18, GP_SHAPE_ELLIPSE}},\
122+
{GP_ELEMENT_PIN_BUTTON, {54, 49, 5, 5, 1, 1, 2, GP_SHAPE_ELLIPSE}},\
123+
{GP_ELEMENT_PIN_BUTTON, {42, 48, 4, 4, 1, 1, 26, GP_SHAPE_ELLIPSE}},\
124+
{GP_ELEMENT_PIN_BUTTON, {77, 15, 2, 2, 1, 1, 14, GP_SHAPE_ELLIPSE}},\
125+
{GP_ELEMENT_PIN_BUTTON, {84, 15, 2, 2, 1, 1, 21, GP_SHAPE_ELLIPSE}},\
126+
{GP_ELEMENT_PIN_BUTTON, {91, 15, 2, 2, 1, 1, 20, GP_SHAPE_ELLIPSE}},\
127+
{GP_ELEMENT_PIN_BUTTON, {98, 15, 2, 2, 1, 1, 16, GP_SHAPE_ELLIPSE}},\
128+
{GP_ELEMENT_PIN_BUTTON, {105, 15, 2, 2, 1, 1, 17, GP_SHAPE_ELLIPSE}}\
129+
}
130+
131+
#define DEFAULT_BOARD_LAYOUT_B {\
132+
{GP_ELEMENT_PIN_BUTTON, {59, 27, 4, 4, 1, 1, 10, GP_SHAPE_ELLIPSE}},\
133+
{GP_ELEMENT_PIN_BUTTON, {69, 25, 4, 4, 1, 1, 11, GP_SHAPE_ELLIPSE}},\
134+
{GP_ELEMENT_PIN_BUTTON, {79, 25, 4, 4, 1, 1, 12, GP_SHAPE_ELLIPSE}},\
135+
{GP_ELEMENT_PIN_BUTTON, {89, 27, 4, 4, 1, 1, 13, GP_SHAPE_ELLIPSE}},\
136+
{GP_ELEMENT_PIN_BUTTON, {59, 37, 4, 4, 1, 1, 6, GP_SHAPE_ELLIPSE}},\
137+
{GP_ELEMENT_PIN_BUTTON, {69, 35, 4, 4, 1, 1, 7, GP_SHAPE_ELLIPSE}},\
138+
{GP_ELEMENT_PIN_BUTTON, {79, 35, 4, 4, 1, 1, 8, GP_SHAPE_ELLIPSE}},\
139+
{GP_ELEMENT_PIN_BUTTON, {89, 37, 4, 4, 1, 1, 9, GP_SHAPE_ELLIPSE}},\
140+
{GP_ELEMENT_PIN_BUTTON, {66, 48, 4, 4, 1, 1, 19, GP_SHAPE_ELLIPSE}}\
141+
}
142+
116143
// Additional Button Support
117144
#define GPIO_PIN_27 GpioAction::BUTTON_PRESS_UP
118145
#define GPIO_PIN_26 GpioAction::BUTTON_PRESS_L3

0 commit comments

Comments
 (0)
Please sign in to comment.