mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-01-22 01:30:35 -05:00
TSC2100: Sample multiple times and provide an average to clean up touch detection.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29218 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
055cb9af50
commit
52b0605fb4
1 changed files with 3 additions and 1 deletions
|
|
@ -81,8 +81,10 @@ void tsc2100_set_mode(bool poweron, unsigned char scan_mode)
|
|||
{
|
||||
short tsadc=(scan_mode<<TSADC_ADSCM_SHIFT)| /* mode */
|
||||
(0x3<<TSADC_RESOL_SHIFT)| /* 12 bit resolution */
|
||||
(0x2<<TSADC_ADAVG_SHIFT)| /* 8 or 9 sample average */
|
||||
(0x2<<TSADC_ADCR_SHIFT )| /* 2 MHz internal clock */
|
||||
(0x2<<TSADC_PVSTC_SHIFT);
|
||||
(0x3<<TSADC_PVSTC_SHIFT)| /* 1 ms stabalization */
|
||||
(TSADC_AVGFS); /* Median filter ( 9 sample ) */
|
||||
|
||||
if(!poweron)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue