Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cirque Attenuation Setting #17342

Merged
merged 26 commits into from
Jun 22, 2022
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
48ca8f8
allowing the kt60 file to be modified so I can do things while waitin…
kylemccreery Feb 2, 2022
a707b79
Merge branch 'master' of github.com:qmk/qmk_firmware
kylemccreery Feb 5, 2022
e904c71
Merge branch 'master' of github.com:qmk/qmk_firmware
kylemccreery Feb 17, 2022
12e4b3e
Merge branch 'master' of github.com:qmk/qmk_firmware
kylemccreery Feb 21, 2022
a400a04
Merge branch 'master' of github.com:qmk/qmk_firmware
kylemccreery Mar 9, 2022
806b231
Merge branch 'master' of github.com:qmk/qmk_firmware
kylemccreery Mar 14, 2022
acf9f51
Merge branch 'master' of github.com:qmk/qmk_firmware
kylemccreery Mar 19, 2022
6c109ff
Merge branch 'master' of github.com:kylemccreery/qmk_firmware
kylemccreery Mar 19, 2022
f3fcd70
Merge branch 'master' of github.com:qmk/qmk_firmware
kylemccreery Apr 15, 2022
15c7296
Merge branch 'master' of github.com:qmk/qmk_firmware
kylemccreery Apr 22, 2022
54f94dd
Merge branch 'master' of github.com:qmk/qmk_firmware
kylemccreery May 17, 2022
1b6fba6
Merge branch 'master' of github.com:qmk/qmk_firmware
kylemccreery May 17, 2022
6591238
Merge branch 'master' of github.com:kylemccreery/qmk_firmware
kylemccreery May 18, 2022
a3bfccb
Merge branch 'master' of github.com:qmk/qmk_firmware
kylemccreery May 18, 2022
46dcc98
Merge branch 'master' of github.com:kylemccreery/qmk_firmware
kylemccreery May 18, 2022
73c922c
Merge branch 'master' of github.com:qmk/qmk_firmware
kylemccreery May 19, 2022
2f5b736
Merge branch 'master' of github.com:qmk/qmk_firmware
kylemccreery May 20, 2022
5e29500
Merge branch 'master' of github.com:qmk/qmk_firmware
kylemccreery May 20, 2022
750dfcf
Merge branch 'master' of github.com:qmk/qmk_firmware
kylemccreery May 24, 2022
f9a9832
Merge branch 'master' of github.com:qmk/qmk_firmware
kylemccreery May 25, 2022
ab5df09
Initial commit.
kylemccreery Jun 9, 2022
f520d38
Fixed formatting.
kylemccreery Jun 9, 2022
58e23e7
Fixed formatting...again.
kylemccreery Jun 9, 2022
32170ea
Moved the new setting and info to the appropriate table.
kylemccreery Jun 9, 2022
82ef0f1
Moved the new setting and info to the appropriate table.
kylemccreery Jun 9, 2022
ff96bac
Changed to work with formatting feedback
kylemccreery Jun 9, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions docs/feature_pointing_device.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ The Analog Joystick is an analog (ADC) driven sensor. There are a variety of jo
|`ANALOG_JOYSTICK_SPEED_MAX` | (Optional) The maximum value used for motion. | `2` |
|`ANALOG_JOYSTICK_CLICK_PIN` | (Optional) The pin wired up to the press switch of the analog stick. | _not defined_ |


### Cirque Trackpad

To use the Cirque Trackpad sensor, add this to your `rules.mk`:
Expand All @@ -96,21 +95,30 @@ This supports the Cirque Pinnacle 1CA027 Touch Controller, which is used in the
|`CIRQUE_PINNACLE_X_UPPER` | (Optional) The maximum reachable X value on the sensor. | `1919` |
|`CIRQUE_PINNACLE_Y_LOWER` | (Optional) The minimum reachable Y value on the sensor. | `63` |
|`CIRQUE_PINNACLE_Y_UPPER` | (Optional) The maximum reachable Y value on the sensor. | `1471` |
|`CIRQUE_PINNACLE_ATTENUATION` | (Optional) Sets the attenuation of the sensor data. | `ADC_ATTENUATE_4X` |
|`CIRQUE_PINNACLE_TAPPING_TERM` | (Optional) Length of time that a touch can be to be considered a tap. | `TAPPING_TERM`/`200` |
|`CIRQUE_PINNACLE_TOUCH_DEBOUNCE` | (Optional) Length of time that a touch can be to be considered a tap. | `TAPPING_TERM`/`200` |

**`CIRQUE_PINNACLE_ATTENUATION`** is a measure of how much data is suppressed in regards to sensitivity. The higher the attenuation, the less sensitive the touchpad will be.

Default attenuation is set to 4X, although if you are using a thicker overlay (such as the curved overlay) you will want a lower attenuation such as 2X. The possible values are:
* `ADC_ATTENUATE_4X`: Least sensitive
* `ADC_ATTENUATE_3X`
* `ADC_ATTENUATE_2X`
* `ADC_ATTENUATE_1X`: Most sensitive

| I2C Setting | Description | Default |
|--------------------------|---------------------------------------------------------------------------------|---------|
|`CIRQUE_PINNACLE_ADDR` | (Required) Sets the I2C Address for the Cirque Trackpad | `0x2A` |
|`CIRQUE_PINNACLE_TIMEOUT` | (Optional) The timeout for i2c communication with the trackpad in milliseconds. | `20` |

| SPI Setting | Description | Default |
|-------------------------------|------------------------------------------------------------------------|---------------|
|`CIRQUE_PINNACLE_CLOCK_SPEED` | (Optional) Sets the clock speed that the sensor runs at. | `1000000` |
|`CIRQUE_PINNACLE_SPI_LSBFIRST` | (Optional) Sets the Least/Most Significant Byte First setting for SPI. | `false` |
|`CIRQUE_PINNACLE_SPI_MODE` | (Optional) Sets the SPI Mode for the sensor. | `1` |
|`CIRQUE_PINNACLE_SPI_DIVISOR` | (Optional) Sets the SPI Divisor used for SPI communication. | _varies_ |
|`CIRQUE_PINNACLE_SPI_CS_PIN` | (Required) Sets the Cable Select pin connected to the sensor. | _not defined_ |
| SPI Setting | Description | Default |
|-------------------------------|------------------------------------------------------------------------|----------------|
|`CIRQUE_PINNACLE_CLOCK_SPEED` | (Optional) Sets the clock speed that the sensor runs at. | `1000000` |
|`CIRQUE_PINNACLE_SPI_LSBFIRST` | (Optional) Sets the Least/Most Significant Byte First setting for SPI. | `false` |
|`CIRQUE_PINNACLE_SPI_MODE` | (Optional) Sets the SPI Mode for the sensor. | `1` |
|`CIRQUE_PINNACLE_SPI_DIVISOR` | (Optional) Sets the SPI Divisor used for SPI communication. | _varies_ |
|`CIRQUE_PINNACLE_SPI_CS_PIN` | (Required) Sets the Cable Select pin connected to the sensor. | _not defined_ |

Default Scaling/CPI is 1024.

Expand Down
7 changes: 6 additions & 1 deletion drivers/sensors/cirque_pinnacle.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,12 @@ 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);
#ifdef CIRQUE_PINNACLE_ATTENUATION
cirque_pinnacle_set_adc_attenuation(CIRQUE_PINNACLE_ATTENUATION);
#else
cirque_pinnacle_set_adc_attenuation(ADC_ATTENUATE_4X);
#endif

kylemccreery marked this conversation as resolved.
Show resolved Hide resolved
cirque_pinnacle_tune_edge_sensitivity();
cirque_pinnacle_enable_feed(true);
}
Expand Down