mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
imx233: make button-lradc drive able to handle VDDIO derived values
In most devices, the button ladder is not actually derived from VDDIO but from a constant voltage source, making it very easy to read it. However on some devices like ther ZEN X-Fi Style, the ladder is wired to VDDIO we can be changed so it's crucial that the button driver correctly scales the values wrt VDDIO. Change-Id: Ifc11abe2838fa7d16d0d60ecd96964a8dc5ea6d7
This commit is contained in:
parent
0e0c610df0
commit
0324bf59a8
4 changed files with 93 additions and 13 deletions
|
|
@ -25,11 +25,22 @@
|
|||
|
||||
bool button_debug_screen(void);
|
||||
|
||||
/* HOLD button */
|
||||
#if !defined(CREATIVE_ZENXFISTYLE)
|
||||
#define HAS_BUTTON_HOLD
|
||||
#define IMX233_BUTTON_LRADC_HOLD_DET BLH_ADC
|
||||
#endif
|
||||
|
||||
/* VDDIO value */
|
||||
#if defined(CREATIVE_ZENXFISTYLE)
|
||||
#define IMX233_BUTTON_LRADC_VDDIO 3660
|
||||
#elif defined(CREATIVE_ZEN)
|
||||
#define IMX233_BUTTON_LRADC_VDDIO 3480
|
||||
#elif defined(CREATIVE_ZENXFI)
|
||||
#define IMX233_BUTTON_LRADC_VDDIO 3500
|
||||
#endif
|
||||
|
||||
/* LRADC channel */
|
||||
#if defined(CREATIVE_ZENXFISTYLE)
|
||||
#define IMX233_BUTTON_LRADC_CHANNEL 2
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue