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

Convert V-USB usbdrv to a submodule #8321

Merged
merged 4 commits into from
Apr 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@
[submodule "lib/lufa"]
path = lib/lufa
url = https://github.com/qmk/lufa
[submodule "lib/vusb"]
path = lib/vusb
url = https://github.com/obdev/v-usb
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@ ifndef SKIP_GIT
if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --depth 50 --init lib/chibios-contrib; fi
if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --depth 50 --init lib/ugfx; fi
if [ ! -e lib/lufa ]; then git submodule sync lib/lufa && git submodule update --depth 50 --init lib/lufa; fi
if [ ! -e lib/vusb ]; then git submodule sync lib/vusb && git submodule update --depth 50 --init lib/vusb; fi
git submodule status --recursive 2>/dev/null | \
while IFS= read -r x; do \
case "$$x" in \
Expand Down
5 changes: 5 additions & 0 deletions docs/ChangeLog/20200530/PR8321.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Converting V-USB usbdrv to a submodule

[#8321](https://github.com/qmk/qmk_firmware/pull/8321) and [qmk_compiler#62](https://github.com/qmk/qmk_compiler/pull/62).

These PRs move the V-USB driver code out of the qmk_firmware repository and into a submodule pointed at https://github.com/obdev/v-usb. This will make it easier to update the codebase if needed, while applying any potential QMK-specific modifications by forking it to the QMK GitHub organization.
1 change: 1 addition & 0 deletions lib/vusb
Submodule vusb added at 9a42d2
4 changes: 0 additions & 4 deletions tmk_core/common/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# include "mousekey.h"
#endif

#ifdef PROTOCOL_VUSB
# include "usbdrv.h"
#endif

#ifdef AUDIO_ENABLE
# include "audio.h"
#endif /* AUDIO_ENABLE */
Expand Down
18 changes: 12 additions & 6 deletions tmk_core/protocol/iwrap.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,17 @@ VPATH += $(TMK_DIR)/protocol/iwrap
# V-USB
#
VUSB_DIR = protocol/vusb
OPT_DEFS += -DPROTOCOL_VUSB
SRC += $(VUSB_DIR)/vusb.c \
$(VUSB_DIR)/usbdrv/usbdrv.c \
$(VUSB_DIR)/usbdrv/usbdrvasm.S \
$(VUSB_DIR)/usbdrv/oddebug.c
VPATH += $(TMK_DIR)/protocol/vusb:$(TMK_DIR)/protocol/vusb/usbdrv

# Path to the V-USB library
VUSB_PATH = $(LIB_PATH)/vusb

SRC += $(VUSB_DIR)/vusb.c \
$(VUSB_PATH)/usbdrv/usbdrv.c \
$(VUSB_PATH)/usbdrv/usbdrvasm.S \
$(VUSB_PATH)/usbdrv/oddebug.c

# Search Path
VPATH += $(TMK_PATH)/$(VUSB_DIR)
VPATH += $(VUSB_PATH)

OPT_DEFS += -DPROTOCOL_VUSB
2 changes: 1 addition & 1 deletion tmk_core/protocol/iwrap/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "iwrap.h"
#ifdef PROTOCOL_VUSB
# include "vusb.h"
# include "usbdrv.h"
# include <usbdrv/usbdrv.h>
#endif
#include "uart.h"
#include "suart.h"
Expand Down
21 changes: 11 additions & 10 deletions tmk_core/protocol/vusb.mk
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
VUSB_DIR = protocol/vusb

OPT_DEFS += -DPROTOCOL_VUSB
# Path to the V-USB library
VUSB_PATH = $(LIB_PATH)/vusb

SRC += $(VUSB_DIR)/main.c \
SRC += $(VUSB_DIR)/main.c \
$(VUSB_DIR)/vusb.c \
$(VUSB_DIR)/usbdrv/usbdrv.c \
$(VUSB_DIR)/usbdrv/usbdrvasm.S \
$(VUSB_DIR)/usbdrv/oddebug.c

$(VUSB_PATH)/usbdrv/usbdrv.c \
$(VUSB_PATH)/usbdrv/usbdrvasm.S \
$(VUSB_PATH)/usbdrv/oddebug.c

ifdef NO_UART
SRC += $(COMMON_DIR)/sendchar_null.c
SRC += $(COMMON_DIR)/sendchar_null.c
else
SRC += $(COMMON_DIR)/sendchar_uart.c \
SRC += $(COMMON_DIR)/sendchar_uart.c \
$(COMMON_DIR)/uart.c
endif


# Search Path
VPATH += $(TMK_PATH)/$(VUSB_DIR)
VPATH += $(TMK_PATH)/$(VUSB_DIR)/usbdrv
VPATH += $(VUSB_PATH)

OPT_DEFS += -DPROTOCOL_VUSB
4 changes: 2 additions & 2 deletions tmk_core/protocol/vusb/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include <avr/wdt.h>
#include <avr/sleep.h>
#include <util/delay.h>
#include "usbdrv.h"
#include "oddebug.h"
#include <usbdrv/usbdrv.h>
#include <usbdrv/oddebug.h>
#include "vusb.h"
#include "keyboard.h"
#include "host.h"
Expand Down
2 changes: 1 addition & 1 deletion tmk_core/protocol/vusb/sendchar_usart.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
*/
#include <stdint.h>
#include "oddebug.h"
#include <usbdrv/oddebug.h>
#include "sendchar.h"

#if DEBUG_LEVEL > 0
Expand Down
Loading