diff options
| -rw-r--r-- | quantum/split_common/split_util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index 96f19bfd84..9af3c29d75 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c | |||
| @@ -63,7 +63,7 @@ static struct { | |||
| 63 | 63 | ||
| 64 | #if defined(SPLIT_USB_DETECT) | 64 | #if defined(SPLIT_USB_DETECT) |
| 65 | _Static_assert((SPLIT_USB_TIMEOUT / SPLIT_USB_TIMEOUT_POLL) <= UINT16_MAX, "Please lower SPLIT_USB_TIMEOUT and/or increase SPLIT_USB_TIMEOUT_POLL."); | 65 | _Static_assert((SPLIT_USB_TIMEOUT / SPLIT_USB_TIMEOUT_POLL) <= UINT16_MAX, "Please lower SPLIT_USB_TIMEOUT and/or increase SPLIT_USB_TIMEOUT_POLL."); |
| 66 | static bool usbIsActive(void) { | 66 | static bool usb_bus_detected(void) { |
| 67 | for (uint16_t i = 0; i < (SPLIT_USB_TIMEOUT / SPLIT_USB_TIMEOUT_POLL); i++) { | 67 | for (uint16_t i = 0; i < (SPLIT_USB_TIMEOUT / SPLIT_USB_TIMEOUT_POLL); i++) { |
| 68 | // This will return true if a USB connection has been established | 68 | // This will return true if a USB connection has been established |
| 69 | if (usb_connected_state()) { | 69 | if (usb_connected_state()) { |
| @@ -74,7 +74,7 @@ static bool usbIsActive(void) { | |||
| 74 | return false; | 74 | return false; |
| 75 | } | 75 | } |
| 76 | #else | 76 | #else |
| 77 | static inline bool usbIsActive(void) { | 77 | static inline bool usb_bus_detected(void) { |
| 78 | return usb_vbus_state(); | 78 | return usb_vbus_state(); |
| 79 | } | 79 | } |
| 80 | #endif | 80 | #endif |
| @@ -179,7 +179,7 @@ __attribute__((weak)) bool is_keyboard_left_impl(void) { | |||
| 179 | } | 179 | } |
| 180 | 180 | ||
| 181 | __attribute__((weak)) bool is_keyboard_master_impl(void) { | 181 | __attribute__((weak)) bool is_keyboard_master_impl(void) { |
| 182 | bool is_master = usbIsActive(); | 182 | bool is_master = usb_bus_detected(); |
| 183 | 183 | ||
| 184 | // Avoid NO_USB_STARTUP_CHECK - Disable USB as the previous checks seem to enable it somehow | 184 | // Avoid NO_USB_STARTUP_CHECK - Disable USB as the previous checks seem to enable it somehow |
| 185 | if (!is_master) { | 185 | if (!is_master) { |
