Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tidy up ADNS9800 and PMW3360 firmware blobs #14936

Merged
merged 2 commits into from
Oct 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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