PMW3360 / PMW3389 Optical Mouse Sensor
PMW3360 / PMW3389 are optical mouse sensors.
Both chips, the PMW3360 and PMW3389, are very similar. The main difference is the higher maximum cpi of the sensor. (12000 on the PMW3360 vs. 16000 on PMW3389) They share one driver in RMK and the configuration of both is the same.
- PMW33xx uses full-duplex SPI. (MISO/ MOSI) Please note that because of the special requirements those sensors have for the switching of their chip select pin, they can not share an SPI bus with each other or any other SPI device. For each SPI peripheral (SPI0, SPI1 etc.) there can only be one sensor connected.
- Set
motionpin for better power efficiency. If omitted, the sensor is polled. - By default, report rate is limited to 125 Hz to prevent flooding the event channel, which causes latency issues especially over BLE.
- Only Nrf, RP2040 and STM32 are supported now.
toml configuration
Split
To add the sensor to the central or peripheral use
Rust configuration
Define a PointingDevice and add it to run_all! macro.
For a split keyboard this must be added to the file (central.rs or peripheral.rs) corresponding to the side the sensor is connected to.
::: Warning
For nrf52 chips you need to add an interrupt for the used SPI. For example when using SPI2:
:::
And define a PointingProcessor and add it to the run_all! macro to process the events.
This should be added to the central.rs-File even if the sensor is on split peripheral.