summaryrefslogtreecommitdiff
path: root/drivers/sensors
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/sensors')
-rw-r--r--drivers/sensors/pmw3360.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/sensors/pmw3360.c b/drivers/sensors/pmw3360.c
index ad0a724ee4..4712f6015c 100644
--- a/drivers/sensors/pmw3360.c
+++ b/drivers/sensors/pmw3360.c
@@ -209,12 +209,16 @@ void pmw3360_upload_firmware(void) {
spi_write(REG_SROM_Load_Burst | 0x80);
wait_us(15);
+#ifdef PMW3360_LEGACY_FIRMWARE_UPLOAD
unsigned char c;
for (int i = 0; i < FIRMWARE_LENGTH; i++) {
c = (unsigned char)pgm_read_byte(firmware_data + i);
spi_write(c);
wait_us(15);
}
+#else
+ spi_transmit(firmware_data, sizeof(firmware_data));
+#endif
wait_us(200);
pmw3360_read(REG_SROM_ID);