Skip to content

Commit

Permalink
Tidy up ADNS9800 and PMW3360 firmware blobs (qmk#14936)
Browse files Browse the repository at this point in the history
  • Loading branch information
fauxpark authored and carcinization committed Dec 2, 2021
1 parent 3e925b9 commit a8306a2
Show file tree
Hide file tree
Showing 4 changed files with 461 additions and 3,355 deletions.
7 changes: 3 additions & 4 deletions drivers/sensors/adns9800.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@
#define US_BEFORE_MOTION 100
#define MSB1 0x80

extern const uint16_t adns_firmware_length;
extern const uint8_t adns_firmware_data[];
extern const uint8_t firmware_data[];

void adns_spi_start(void){
spi_start(SPI_SS_PIN, false, SPI_MODE, SPI_DIVISOR);
Expand Down Expand Up @@ -145,8 +144,8 @@ void adns_init() {

// send all bytes of the firmware
unsigned char c;
for(int i = 0; i < adns_firmware_length; i++){
c = (unsigned char)pgm_read_byte(adns_firmware_data + i);
for(int i = 0; i < FIRMWARE_LENGTH; i++){
c = (unsigned char)pgm_read_byte(firmware_data + i);
spi_write(c);
wait_us(15);
}
Expand Down
Loading

0 comments on commit a8306a2

Please sign in to comment.