cpu halted flag on vm's mmio

This commit is contained in:
minjaesong
2022-12-28 04:54:14 +09:00
parent d619106a57
commit 3282faf9e6
12 changed files with 116 additions and 14 deletions

View File

@@ -88,14 +88,18 @@ MMIO
88 RW: Rom mapping
89 RO: BMS flags
0b b000 00ca
89 RW: BMS flags
0b P000 b0ca
a: 1 if charging (accepting power from the AC adapter)
c: 1 if battery is detected
b: 1 if the device is battery-operated
P: 1 if CPU halted (so that the "smart" power supply can shut itself down)
note: only the high nybbles are writable!
if the device is battery-operated but currently running off of an AC adapter and there is no battery inserted,
the flag would be 1000 0001
the flag would be 0000 1001
90 RO: BMS calculated battery percentage where 255 is 100%
91 RO: BMS battery voltage multiplied by 10 (127 = "12.7 V")