Skip to content

Commit

Permalink
Merge 2 PR to improve blackpill boot time
Browse files Browse the repository at this point in the history
- qmk#15805: [Core] ChibiOS: shorten USB disconnect state on boot to 50ms
- qmk#15821: Optimize initialization of PMW3360 Sensor
  • Loading branch information
0xcharly committed Feb 6, 2022
1 parent f33f7e5 commit 8c7b1d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions drivers/sensors/pmw3360.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,7 @@ void pmw3360_upload_firmware(void) {
spi_write(REG_SROM_Load_Burst | 0x80);
wait_us(15);

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);
}
spi_transmit(firmware_data, sizeof(firmware_data));
wait_us(200);

spi_read_adv(REG_SROM_ID);
Expand Down
2 changes: 1 addition & 1 deletion tmk_core/protocol/chibios/usb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ void init_usb_driver(USBDriver *usbp) {
* after a reset.
*/
usbDisconnectBus(usbp);
wait_ms(1500);
wait_ms(50);
usbStart(usbp, &usbcfg);
usbConnectBus(usbp);

Expand Down

0 comments on commit 8c7b1d7

Please sign in to comment.