forked from mirrors/qmk_firmware
Avoid LTO conficts on arm_atsam (#13676)
This commit is contained in:
parent
7907a72584
commit
567da49ed0
6 changed files with 6 additions and 6 deletions
|
@ -106,7 +106,7 @@ __attribute__((weak)) bool is_keyboard_master(void) {
|
|||
|
||||
// Avoid NO_USB_STARTUP_CHECK - Disable USB as the previous checks seem to enable it somehow
|
||||
if (usbstate == SLAVE) {
|
||||
usb_disable();
|
||||
usb_disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "quantum.h"
|
||||
#include "usb_util.h"
|
||||
|
||||
__attribute__((weak)) void usb_disable(void) {}
|
||||
__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
|
||||
|
|
|
@ -17,6 +17,6 @@
|
|||
|
||||
#include <stdbool.h>
|
||||
|
||||
void usb_disable(void);
|
||||
void usb_disconnect(void);
|
||||
bool usb_connected_state(void);
|
||||
bool usb_vbus_state(void);
|
||||
|
|
|
@ -16,6 +16,6 @@
|
|||
#include <hal.h>
|
||||
#include "usb_util.h"
|
||||
|
||||
void usb_disable(void) { usbStop(&USBD1); }
|
||||
void usb_disconnect(void) { usbStop(&USBD1); }
|
||||
|
||||
bool usb_connected_state(void) { return usbGetDriverStateI(&USBD1) == USB_ACTIVE; }
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "usb_util.h"
|
||||
#include "wait.h"
|
||||
|
||||
void usb_disable(void) {
|
||||
void usb_disconnect(void) {
|
||||
USB_Disable();
|
||||
USB_DeviceState = DEVICE_STATE_Unattached;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include <usbdrv/usbdrv.h>
|
||||
#include "usb_util.h"
|
||||
|
||||
void usb_disable(void) { usbDeviceDisconnect(); }
|
||||
void usb_disconnect(void) { usbDeviceDisconnect(); }
|
||||
|
||||
bool usb_connected_state(void) {
|
||||
usbPoll();
|
||||
|
|
Loading…
Reference in a new issue