Skip to content

Commit

Permalink
tg3040: fixed leds sleep behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaun Inman committed Oct 29, 2024
1 parent 6f715c4 commit 659b1ca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
9 changes: 2 additions & 7 deletions todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@ Changes

BASE

- rgcubexx: added initial RG CubeXX support
- tg3040: added initial Trimui Brick support
- tg5040 + tg3040: FN switch now toggles volume/rumble mute
- tg5040: fixed fullscreen/screen effect combination crash
- tg3040: fixed led install/update/sleep behaviour on 20241020 ofw


EXTRAS

- rgcubexx: added initial RG CubeXX support
- tg3040: added initial Trimui Brick support
-

---

Expand All @@ -24,7 +20,6 @@ rgcubexx
and unzip

tg3040
leds don't turn off during install/update
mute switch is polled at 1fps in trimui_inputd
you can feel that latency
should keymon poll /sys/class/gpio/gpio243/value directly?
Expand Down
12 changes: 9 additions & 3 deletions workspace/tg3040/platform/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,15 +375,21 @@ void PLAT_getBatteryStatus(int* is_charging, int* charge) {
online = prefixMatch("up", status);
}

#define LED_PATH "/sys/class/led_anim/max_scale"
#define LED_PATH1 "/sys/class/led_anim/max_scale"
#define LED_PATH2 "/sys/class/led_anim/max_scale_lr"
#define LED_PATH3 "/sys/class/led_anim/max_scale_f1f2" // front facing
void PLAT_enableBacklight(int enable) {
if (enable) {
SetBrightness(GetBrightness());
putInt(LED_PATH,0);
putInt(LED_PATH1,0);
// putInt(LED_PATH2,0);
putInt(LED_PATH3,0);
}
else {
SetRawBrightness(0);
putInt(LED_PATH,52); // 52 seems to be the max brightness
putInt(LED_PATH1,60);
// putInt(LED_PATH2,60);
putInt(LED_PATH3,60);
}
}

Expand Down

0 comments on commit 659b1ca

Please sign in to comment.