mirror of
https://github.com/openstenoproject/qmk
synced 2024-11-09 10:13:29 +00:00
Fix for SPI write timing in PMW3360 driver (#15519)
Timing does not match Pixart documentation for this sensor (may have been carried forward from adns9800). Not aware of any issues coming from this currently. It should only cause issues when writing to multiple registers in succession which currently only happens during initialization for the PMW3360. This should prevent future issues with write operations if other features of the sensor are added.
This commit is contained in:
parent
740c47d4d7
commit
f08824f6eb
1 changed files with 3 additions and 3 deletions
|
@ -108,10 +108,10 @@ spi_status_t spi_write_adv(uint8_t reg_addr, uint8_t data) {
|
||||||
status = spi_write(data);
|
status = spi_write(data);
|
||||||
|
|
||||||
// tSCLK-NCS for write operation
|
// tSCLK-NCS for write operation
|
||||||
wait_us(20);
|
wait_us(35);
|
||||||
|
|
||||||
// tSWW/tSWR (=120us) minus tSCLK-NCS. Could be shortened, but is looks like a safe lower bound
|
// tSWW/tSWR (=180us) minus tSCLK-NCS. Could be shortened, but is looks like a safe lower bound
|
||||||
wait_us(100);
|
wait_us(145);
|
||||||
spi_stop();
|
spi_stop();
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue