12345678910111213141516171819202122232425262728293031 |
- #include "quantum.h"
- #include "usb_util.h"
- __attribute__((weak)) void usb_disconnect(void) {}
- __attribute__((weak)) bool usb_connected_state(void) {
- return true;
- }
- __attribute__((weak)) bool usb_vbus_state(void) {
- #ifdef USB_VBUS_PIN
- setPinInput(USB_VBUS_PIN);
- wait_us(5);
- return readPin(USB_VBUS_PIN);
- #else
- return true;
- #endif
- }
|