summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKyle McCreery <mccreery.kyle@gmail.com>2022-06-22 15:59:37 -0400
committerGitHub <noreply@github.com>2022-06-22 21:59:37 +0200
commiteac0f6d4c99edf37903b14b7b71492fab69d4b08 (patch)
tree98f20de0f7c181c12f5086c2bdc3dc2d68b5af8f /drivers
parent2e27eb318e4e2fba3c6961f827e5107d1b8f57f2 (diff)
Cirque Attenuation Setting (#17342)
Diffstat (limited to 'drivers')
-rw-r--r--drivers/sensors/cirque_pinnacle.c7
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);
}