Avoid LTO conficts on arm_atsam (#13676)

This commit is contained in:
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
if (usbstate == SLAVE) {
usb_disable();
usb_disconnect();
}
}

View file

@ -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

View file

@ -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);

View file

@ -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; }

View file

@ -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;
}

View file

@ -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();