Specified possible keypad backlight control
This commit is contained in:
@@ -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:
|
The `05` port is divided as follows:
|
||||||
|
|
||||||
Bits |7 |6-4 |3-0
|
Bits |7 |6-4 |3 |2-0
|
||||||
-------|---------------|-------------|---------------------------
|
-------|---------------|-------------|----------------|--------------------
|
||||||
Meaning|Charger plugged|Battery level|Screen backlight brightness
|
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 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
|
## Sound output
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -29,7 +29,7 @@ function ESOPExtensions() {
|
|||||||
})
|
})
|
||||||
//setup status port
|
//setup status port
|
||||||
vm.setReadHook(0x05, function() {
|
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
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user