1
0
Fork 0
forked from len0rd/rockbox

Button driver overhaul: (1) Unified the button driver functions as much as possible (2) Proper #defines for FM recorder button ADC channels (3) Got rid of old port B #defines only valid for recorder (4) button filtering for all models (5) RoLo with ON after panic should now work for FM/V2

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5472 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2004-12-01 00:33:18 +00:00
parent bbc5931280
commit 303b4abfc5
5 changed files with 177 additions and 305 deletions

View file

@ -41,8 +41,6 @@
#define ADC_BUTTON_ROW1 4 /* Used for scanning the keys, different
voltages for different keys */
#define ADC_UNREG_POWER 7 /* Battery voltage */
/* FixMe: this doesn't exist, just to make the compiler happy */
#define ADC_EXT_POWER 5 /* The external power voltage, V=X*0.0148 */
#else
/* normal JBR channel assignment */
@ -51,6 +49,8 @@
#ifdef HAVE_FMADC
#define ADC_CHARGE_REGULATOR 0 /* Uh, we read the battery voltage? */
#define ADC_USB_POWER 1 /* USB, reads 0x000 when USB is inserted */
#define ADC_BUTTON_OFF 2 /* the off button, high value if pressed */
#define ADC_BUTTON_ON 3 /* the on button, low value if pressed */
#else
#define ADC_CHARGE_REGULATOR 1 /* Regulator reference voltage, should read
about 0x1c0 when charging, else 0x3FF */