Avoid LTO conficts on arm_atsam (#13676)

master
Joel Challis 2021-07-24 12:13:06 +01:00 committed by GitHub
parent 7907a72584
commit 567da49ed0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 6 deletions

View File

@ -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 // Avoid NO_USB_STARTUP_CHECK - Disable USB as the previous checks seem to enable it somehow
if (usbstate == SLAVE) { if (usbstate == SLAVE) {
usb_disable(); usb_disconnect();
} }
} }

View File

@ -16,7 +16,7 @@
#include "quantum.h" #include "quantum.h"
#include "usb_util.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_connected_state(void) { return true; }
__attribute__((weak)) bool usb_vbus_state(void) { __attribute__((weak)) bool usb_vbus_state(void) {
#ifdef USB_VBUS_PIN #ifdef USB_VBUS_PIN

View File

@ -17,6 +17,6 @@
#include <stdbool.h> #include <stdbool.h>
void usb_disable(void); void usb_disconnect(void);
bool usb_connected_state(void); bool usb_connected_state(void);
bool usb_vbus_state(void); bool usb_vbus_state(void);

View File

@ -16,6 +16,6 @@
#include <hal.h> #include <hal.h>
#include "usb_util.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; } bool usb_connected_state(void) { return usbGetDriverStateI(&USBD1) == USB_ACTIVE; }

View File

@ -17,7 +17,7 @@
#include "usb_util.h" #include "usb_util.h"
#include "wait.h" #include "wait.h"
void usb_disable(void) { void usb_disconnect(void) {
USB_Disable(); USB_Disable();
USB_DeviceState = DEVICE_STATE_Unattached; USB_DeviceState = DEVICE_STATE_Unattached;
} }

View File

@ -16,7 +16,7 @@
#include <usbdrv/usbdrv.h> #include <usbdrv/usbdrv.h>
#include "usb_util.h" #include "usb_util.h"
void usb_disable(void) { usbDeviceDisconnect(); } void usb_disconnect(void) { usbDeviceDisconnect(); }
bool usb_connected_state(void) { bool usb_connected_state(void) {
usbPoll(); usbPoll();