commit 9c78ab51930972d48f1814eff51212fad94d6b31
parent 79b3693cfb6ef3c611ccb830c67e517cda5acd02
Author: Luxferre <3335173-suborg@users.noreply.gitlab.com>
Date: Fri, 29 Jul 2022 07:37:21 +0300
Specified possible keypad backlight control
Diffstat:
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
@@ -83,15 +83,15 @@ Just like with SPARTA, it's entirely up to the implementation to choose the rand
The `05` port is divided as follows:
-Bits |7 |6-4 |3-0
--------|---------------|-------------|---------------------------
-Meaning|Charger plugged|Battery level|Screen backlight brightness
+Bits |7 |6-4 |3 |2-0
+-------|---------------|-------------|----------------|--------------------
+Meaning|Charger plugged|Battery level|Keypad BL switch|Screen BL brightness
The higher nibble (bits 4 to 7) is used to indicate the status of charging and battery level. This nibble is read-only and must be ignored on modification.
-The lower nibble (bits 0 to 3) of the status can be modified from the application, and the runtime should attempt to change the backlight brightness level, where 15 is the highest and 0 means backlight off.
+The lower nibble (bits 0 to 3) of the status can be modified from the application, and the runtime should attempt to change the screen backlight brightness level, where 7 is the highest and 0 means backlight off, and toggle the keypad backlight switch as well if supported.
-Note: emulated environments are allowed to always return `ff` when this port is read from, which means emulating a fully charged phone with external power supply connected on the maximum brightness.
+Note: emulated environments are allowed to always return `ff` when this port is read from, which means emulating a fully charged phone with external power supply connected on the maximum screen brightness and backlit keypad.
## Sound output
diff --git a/web/esop-ext.js b/web/esop-ext.js
@@ -29,7 +29,7 @@ function ESOPExtensions() {
})
//setup status port
vm.setReadHook(0x05, function() {
- vm.setdev(0x05, 0xff) //emulate full brightness, full charge and charger plugged in
+ vm.setdev(0x05, 0xff) //emulate full brightness, backlit keypad, full charge and charger plugged in
})
}