Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor of USB code within split_common #11890

Merged
merged 5 commits into from
Feb 28, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Format
  • Loading branch information
zvecr committed Feb 25, 2021
commit 2f345e9229c8fa150802872c33246adb36773af3
4 changes: 1 addition & 3 deletions quantum/split_common/split_util.c
Original file line number Diff line number Diff line change
@@ -53,9 +53,7 @@ static bool usbIsActive(void) {
return false;
}
#else
static inline bool usbIsActive(void) {
return usb_vbus_state();
}
static inline bool usbIsActive(void) { return usb_vbus_state(); }
#endif

#ifdef SPLIT_HAND_MATRIX_GRID
2 changes: 1 addition & 1 deletion tmk_core/common.mk
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ TMK_COMMON_SRC += $(COMMON_DIR)/host.c \
$(COMMON_DIR)/sendchar_null.c \
$(COMMON_DIR)/eeconfig.c \
$(COMMON_DIR)/report.c \
$(COMMON_DIR)/usb_util.c \
$(COMMON_DIR)/usb_util.c \
$(PLATFORM_COMMON_DIR)/suspend.c \
$(PLATFORM_COMMON_DIR)/timer.c \
$(COMMON_DIR)/sync_timer.c \
6 changes: 3 additions & 3 deletions tmk_core/common/usb_util.c
Original file line number Diff line number Diff line change
@@ -16,9 +16,9 @@
#include "usb_util.h"
#include "wait.h"

__attribute__ ((weak)) bool usb_active_connection(void) { return true; }
__attribute__ ((weak)) void usb_disable(void) {}
__attribute__ ((weak)) bool usb_vbus_state(void) {
__attribute__((weak)) bool usb_active_connection(void) { return true; }
__attribute__((weak)) void usb_disable(void) {}
__attribute__((weak)) bool usb_vbus_state(void) {
#ifdef USB_VBUS_PIN
setPinInput(USB_VBUS_PIN);
wait_us(5);