Merge remote-tracking branch 'origin/develop' into xap

This commit is contained in:
QMK Bot 2024-05-05 07:17:55 +00:00
commit 18c5567915

View File

@ -63,7 +63,7 @@ static struct {
#if defined(SPLIT_USB_DETECT) #if defined(SPLIT_USB_DETECT)
_Static_assert((SPLIT_USB_TIMEOUT / SPLIT_USB_TIMEOUT_POLL) <= UINT16_MAX, "Please lower SPLIT_USB_TIMEOUT and/or increase SPLIT_USB_TIMEOUT_POLL."); _Static_assert((SPLIT_USB_TIMEOUT / SPLIT_USB_TIMEOUT_POLL) <= UINT16_MAX, "Please lower SPLIT_USB_TIMEOUT and/or increase SPLIT_USB_TIMEOUT_POLL.");
static bool usbIsActive(void) { static bool usb_bus_detected(void) {
for (uint16_t i = 0; i < (SPLIT_USB_TIMEOUT / SPLIT_USB_TIMEOUT_POLL); i++) { for (uint16_t i = 0; i < (SPLIT_USB_TIMEOUT / SPLIT_USB_TIMEOUT_POLL); i++) {
// This will return true if a USB connection has been established // This will return true if a USB connection has been established
if (usb_connected_state()) { if (usb_connected_state()) {
@ -74,7 +74,7 @@ static bool usbIsActive(void) {
return false; return false;
} }
#else #else
static inline bool usbIsActive(void) { static inline bool usb_bus_detected(void) {
return usb_vbus_state(); return usb_vbus_state();
} }
#endif #endif
@ -179,7 +179,7 @@ __attribute__((weak)) bool is_keyboard_left_impl(void) {
} }
__attribute__((weak)) bool is_keyboard_master_impl(void) { __attribute__((weak)) bool is_keyboard_master_impl(void) {
bool is_master = usbIsActive(); bool is_master = usb_bus_detected();
// 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 (!is_master) { if (!is_master) {