#99062 - Lick - Sat Aug 19, 2006 11:02 am
Hey everyone, if you haven't seen my brightness demo: you really should!
It's a FIFO-based demo that demonstrates 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.
http://lick.huuf.net/brightness_test_v2.zip (Play with it, plug the charger in and out etc.)
Hope the code will help you develop a strong application!
- Lick
P.S. Thanks Huuf for hosting!
_________________
http://licklick.wordpress.com
It's a FIFO-based demo that demonstrates 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.
Code: |
` 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. - 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. |
http://lick.huuf.net/brightness_test_v2.zip (Play with it, plug the charger in and out etc.)
Hope the code will help you develop a strong application!
- Lick
P.S. Thanks Huuf for hosting!
_________________
http://licklick.wordpress.com