1234567891011121314151617181920212223242526272829 |
- #include "usb_util.h"
- #include "wait.h"
- __attribute__((weak)) void usb_disable(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
- }
|