1
0
Fork 0

Add PMW3389 optical sensor Support (Updated) (#15740)

Co-authored-by: Drashna Jaelre <drashna@live.com>
This commit is contained in:
Alabastard-64 2022-01-11 15:33:13 -07:00 committed by GitHub
parent a7eb27b867
commit 2842ab4052
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 721 additions and 294 deletions

View file

@ -155,6 +155,29 @@ The PMW 3360 is an SPI driven optical sensor, that uses a built in IR LED for su
The CPI range is 100-12000, in increments of 100. Defaults to 1600 CPI.
### PMW 3389 Sensor
To use the PMW 3389 sensor, add this to your `rules.mk`
```make
POINTING_DEVICE_DRIVER = pmw3389
```
The PMW 3389 is an SPI driven optical sensor, that uses a built in IR LED for surface tracking.
| Setting | Description | Default |
|---------------------------------|--------------------------------------------------------------------------------------------|---------------|
|`PMW3389_CS_PIN` | (Required) Sets the Cable Select pin connected to the sensor. | _not defined_ |
|`PMW3389_CLOCK_SPEED` | (Optional) Sets the clock speed that the sensor runs at. | `2000000` |
|`PMW3389_SPI_LSBFIRST` | (Optional) Sets the Least/Most Significant Byte First setting for SPI. | `false` |
|`PMW3389_SPI_MODE` | (Optional) Sets the SPI Mode for the sensor. | `3` |
|`PMW3389_SPI_DIVISOR` | (Optional) Sets the SPI Divisor used for SPI communication. | _varies_ |
|`PMW3389_LIFTOFF_DISTANCE` | (Optional) Sets the lift off distance at run time | `0x02` |
|`ROTATIONAL_TRANSFORM_ANGLE` | (Optional) Allows for the sensor data to be rotated +/- 30 degrees directly in the sensor. | `0` |
|`PMW3389_LEGACY_FIRMWARE_UPLOAD` | (Optional) Switches to older, manual upload of firmware, for compatibility. | _not defined_ |
The CPI range is 50-16000, in increments of 50. Defaults to 2000 CPI.
### Custom Driver