Demo updated, new information found!
If you still don’t know what kind of demo it is: It’s a FIFO-based demo that demonstrates multiple useful information gathering from the ARM7-access-only registers.
I was messing with version 1 of the demo as I found out that when the charger was plugged in, the brightness value increased by 8. So I figured that bit(3) would be the ‘is battery charging’ bit. As I’m not sure if this is DS Lite specific (probably not), I hereby declare that SPI DATA REG 4 is -NOT- DS Lite specific anymore, but is also containing other information.
In my src I call it PM_HARDWARE_REG (perhaps it should be called EXTRA).
Anyway, I updated on several spots. Read below.
` 19-08-06 ` Found a powerful useful bit. The is-battery-recharging bit.
It’s the 4th bit (BIT(3)) of SPI DATA REG 4, that was at first
though to be a DS Lite specific register.
- Added feature to see if battery is recharging.
- Instead of substracting 64, the brightness bit is masked. (Bugfix)
- Renamed some of the #defines and functions.
- Made GET_BRIGHTNESS on Phatty return 0 or 1. (not 0 or 2)
- Added the sun icon, I pixelled (hehe), to the package.
Hope the code will help you develop a strong application!
P.S. Thanks Huuf for hosting!