diff options
author | Kyle McCreery <mccreery.kyle@gmail.com> | 2022-06-22 15:59:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-22 21:59:37 +0200 |
commit | eac0f6d4c99edf37903b14b7b71492fab69d4b08 (patch) | |
tree | 98f20de0f7c181c12f5086c2bdc3dc2d68b5af8f /drivers/sensors | |
parent | 2e27eb318e4e2fba3c6961f827e5107d1b8f57f2 (diff) |
Cirque Attenuation Setting (#17342)
Diffstat (limited to 'drivers/sensors')
-rw-r--r-- | drivers/sensors/cirque_pinnacle.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/sensors/cirque_pinnacle.c b/drivers/sensors/cirque_pinnacle.c index 2db7f916fe..670b96f2fb 100644 --- a/drivers/sensors/cirque_pinnacle.c +++ b/drivers/sensors/cirque_pinnacle.c @@ -38,6 +38,10 @@ #define ADC_ATTENUATE_3X 0x80 #define ADC_ATTENUATE_4X 0xC0 +#ifndef CIRQUE_PINNACLE_ATTENUATION +# define CIRQUE_PINNACLE_ATTENUATION ADC_ATTENUATE_4X +#endif + // Register config values for this demo #define SYSCONFIG_1_VALUE 0x00 #define FEEDCONFIG_1_VALUE 0x03 // 0x03 for absolute mode 0x01 for relative mode @@ -213,7 +217,8 @@ void cirque_pinnacle_init(void) { // Host sets z-idle packet count to 5 (default is 30) RAP_Write(Z_IDLE_COUNT, Z_IDLE_COUNT_VALUE); - cirque_pinnacle_set_adc_attenuation(0xFF); + cirque_pinnacle_set_adc_attenuation(CIRQUE_PINNACLE_ATTENUATION); + cirque_pinnacle_tune_edge_sensitivity(); cirque_pinnacle_enable_feed(true); } |