Skip to content

Commit 6837d56

Browse files
Update fri3d_2026
1 parent 8e734b1 commit 6837d56

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

internal_filesystem/lib/mpos/board/fri3d_2026.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Hardware initialization for Fri3d Camp 2026 Badge
22

3-
# TODO:
4-
# - touch screen / touch pad
3+
# Overview:
4+
# - Touch screen controller is cst816s
55
# - IMU (LSM6DSO) is different from fri3d_2024 (and address 0x6A instead of 0x6B) but the API seems the same, except different chip ID (0x6C iso 0x6A)
66
# - I2S audio (communicator) is the same
77
# - headphone jack audio?
@@ -30,6 +30,7 @@
3030

3131
import mpos.ui
3232
import mpos.ui.focus_direction
33+
from mpos import InputManager
3334

3435
TFT_HOR_RES=320
3536
TFT_VER_RES=240
@@ -85,7 +86,8 @@
8586
# touch pad interrupt TP Int is on ESP.IO13
8687
i2c_bus = i2c.I2C.Bus(host=I2C_BUS, scl=TP_SCL, sda=TP_SDA, freq=I2C_FREQ, use_locks=False)
8788
touch_dev = i2c.I2C.Device(bus=i2c_bus, dev_id=0x15, reg_bits=TP_REGBITS)
88-
indev=cst816s.CST816S(touch_dev,startup_rotation=lv.DISPLAY_ROTATION._180) # button in top left, good
89+
tindev=cst816s.CST816S(touch_dev,startup_rotation=lv.DISPLAY_ROTATION._180) # button in top left, good
90+
InputManager.register_indev(tindev)
8991

9092
lv.init()
9193
mpos.ui.main_display.set_rotation(lv.DISPLAY_ROTATION._270) # must be done after initializing display and creating the touch drivers, to ensure proper handling
@@ -180,6 +182,7 @@ def keypad_read_cb(indev, data):
180182
disp = lv.display_get_default() # NOQA
181183
indev.set_display(disp) # different from display
182184
indev.enable(True) # NOQA
185+
InputManager.register_indev(indev)
183186

184187
# Battery voltage ADC measuring: sits on PC0 of CH32X035GxUx
185188
import mpos.battery_voltage

0 commit comments

Comments
 (0)