diff options
author | Stefan Kerkmann <karlk90@pm.me> | 2024-05-05 09:17:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-05 08:17:22 +0100 |
commit | 5daae4bee9622c58d13a901981540c7d95d5bbca (patch) | |
tree | 465bb77ede931a7abe880243c0e6390ff40ec2fb /quantum | |
parent | 8db8431d842e84cdf066de33c3d05a56c9857687 (diff) | |
download | qmk_firmware-5daae4bee9622c58d13a901981540c7d95d5bbca.tar.gz qmk_firmware-5daae4bee9622c58d13a901981540c7d95d5bbca.zip |
split_util: rename `usbIsActive` to `usb_bus_detected` (#23657)
split_util: rename usbIsActive to usb_bus_detected
This follows the style rules and better reflects the intent.
Signed-off-by: Stefan Kerkmann <karlk90@pm.me>
Diffstat (limited to 'quantum')
-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 { #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 bool usbIsActive(void) { +static bool usb_bus_detected(void) { 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 if (usb_connected_state()) { @@ -74,7 +74,7 @@ static bool usbIsActive(void) { return false; } #else -static inline bool usbIsActive(void) { +static inline bool usb_bus_detected(void) { return usb_vbus_state(); } #endif @@ -179,7 +179,7 @@ __attribute__((weak)) bool is_keyboard_left_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 if (!is_master) { |