Skip to content

Conversation

@hydra
Copy link

@hydra hydra commented Jan 20, 2026

In qmk, there was startup code:

usbDisconnectBus(usbp);
usbStop(usbp);

wait_ms(50);

usbStart(usbp, &usbcfg);
usbConnectBus(usbp);

then later:

usbDisconnectBus(&USB_DRIVER);
usbStop(&USB_DRIVER);

This commit prevents crashes in the start/stop/connect/disconnect and ISRs for this sequence of calls.

in qmk, there was startup code:

```
usbDisconnectBus(usbp);
usbStop(usbp);

wait_ms(50);

usbStart(usbp, &usbcfg);
usbConnectBus(usbp);
```

then later:
```
usbDisconnectBus(&USB_DRIVER);
usbStop(&USB_DRIVER);
```

This commit prevents crashes in the start/stop/connect/disconnect and ISRs for this sequence of calls.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant