diff options
Diffstat (limited to 'drivers/sensors/pmw3389.c')
-rw-r--r-- | drivers/sensors/pmw3389.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/sensors/pmw3389.c b/drivers/sensors/pmw3389.c index d6f02b6a59..963925bd38 100644 --- a/drivers/sensors/pmw3389.c +++ b/drivers/sensors/pmw3389.c @@ -210,14 +210,12 @@ void pmw3389_upload_firmware(void) { spi_write(REG_SROM_Load_Burst | 0x80); wait_us(15); - // legacy only for PMW3389 spi_transmit failed to load firmware - unsigned char c; - for (int i = 0; i < FIRMWARE_LENGTH; i++) { - c = (unsigned char)pgm_read_byte(firmware_data + i); - spi_write(c); + for (uint16_t i = 0; i < FIRMWARE_LENGTH; i++) { + spi_write(pgm_read_byte(firmware_data + i)); +#ifndef PMW3389_FIRMWARE_UPLOAD_FAST wait_us(15); +#endif } - wait_us(200); pmw3389_read(REG_SROM_ID); |