From 51eba859069fe2be850e9a1215a4df3d87bef69a Mon Sep 17 00:00:00 2001 From: Scott Perry Date: Mon, 15 Aug 2016 22:19:04 -0700 Subject: [PATCH] Move firmware into /source, deps as submodules in /libraries --- .gitmodules | 6 ++++++ .travis.yml | 11 +++-------- libraries/HID | 1 + libraries/KeyboardioScanner | 1 + KeyboardConfig.cpp => source/KeyboardConfig.cpp | 2 +- KeyboardConfig.h => source/KeyboardConfig.h | 0 KeyboardioFirmware.h => source/KeyboardioFirmware.h | 0 .../KeyboardioFirmware.ino | 0 LEDControl.cpp => source/LEDControl.cpp | 0 LEDControl.h => source/LEDControl.h | 0 Makefile => source/Makefile | 10 +++++----- MouseWrapper.cpp => source/MouseWrapper.cpp | 0 MouseWrapper.h => source/MouseWrapper.h | 0 Storage.cpp => source/Storage.cpp | 0 Storage.h => source/Storage.h | 0 {generated => source/generated}/keymaps.h | 0 {implementation => source/implementation}/Model01.cpp | 0 {implementation => source/implementation}/Model01.h | 0 key_defs.h => source/key_defs.h | 0 key_events.cpp => source/key_events.cpp | 0 key_events.h => source/key_events.h | 0 keymaps.h => source/keymaps.h | 0 keyswitch_state.cpp => source/keyswitch_state.cpp | 0 keyswitch_state.h => source/keyswitch_state.h | 0 utils.cpp => source/utils.cpp | 0 utils.h => source/utils.h | 0 26 files changed, 17 insertions(+), 14 deletions(-) create mode 100644 .gitmodules create mode 160000 libraries/HID create mode 160000 libraries/KeyboardioScanner rename KeyboardConfig.cpp => source/KeyboardConfig.cpp (90%) rename KeyboardConfig.h => source/KeyboardConfig.h (100%) rename KeyboardioFirmware.h => source/KeyboardioFirmware.h (100%) rename KeyboardioFirmware.ino => source/KeyboardioFirmware.ino (100%) rename LEDControl.cpp => source/LEDControl.cpp (100%) rename LEDControl.h => source/LEDControl.h (100%) rename Makefile => source/Makefile (89%) rename MouseWrapper.cpp => source/MouseWrapper.cpp (100%) rename MouseWrapper.h => source/MouseWrapper.h (100%) rename Storage.cpp => source/Storage.cpp (100%) rename Storage.h => source/Storage.h (100%) rename {generated => source/generated}/keymaps.h (100%) rename {implementation => source/implementation}/Model01.cpp (100%) rename {implementation => source/implementation}/Model01.h (100%) rename key_defs.h => source/key_defs.h (100%) rename key_events.cpp => source/key_events.cpp (100%) rename key_events.h => source/key_events.h (100%) rename keymaps.h => source/keymaps.h (100%) rename keyswitch_state.cpp => source/keyswitch_state.cpp (100%) rename keyswitch_state.h => source/keyswitch_state.h (100%) rename utils.cpp => source/utils.cpp (100%) rename utils.h => source/utils.h (100%) diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..9501d554 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "libraries/KeyboardioScanner"] + path = libraries/KeyboardioScanner + url = https://github.com/keyboardio/KeyboardioScanner.git +[submodule "libraries/HID"] + path = libraries/HID + url = https://github.com/keyboardio/HID.git diff --git a/.travis.yml b/.travis.yml index 16e61c25..2e175136 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,15 +5,10 @@ before_install: - tar xf arduino-1.6.7-linux64.tar.xz - popd install: -- mkdir ../libs -- pushd ../libs -- git clone https://github.com/keyboardio/KeyboardioScanner.git -- git clone https://github.com/keyboardio/KeyboardioWS2812.git -- git clone https://github.com/keyboardio/HID.git -- git clone https://github.com/keyboardio/KeyboardioSX1509.git -- popd +- git submodule sync --recursive +- git submodule update --init --recursive script: -- make compile size ARDUINO_PATH=../arduino-1.6.7 ARDUINO_LOCAL_LIB_PATH=../libs +- make compile size ARDUINO_PATH=../arduino-1.6.7 notifications: irc: channels: diff --git a/libraries/HID b/libraries/HID new file mode 160000 index 00000000..49035065 --- /dev/null +++ b/libraries/HID @@ -0,0 +1 @@ +Subproject commit 490350650f9b9bf859ae8d16a0a77eab1d362637 diff --git a/libraries/KeyboardioScanner b/libraries/KeyboardioScanner new file mode 160000 index 00000000..9810df50 --- /dev/null +++ b/libraries/KeyboardioScanner @@ -0,0 +1 @@ +Subproject commit 9810df50b2f66da02510707126181982692a41b8 diff --git a/KeyboardConfig.cpp b/source/KeyboardConfig.cpp similarity index 90% rename from KeyboardConfig.cpp rename to source/KeyboardConfig.cpp index 33d5238e..4ea21d7c 100644 --- a/KeyboardConfig.cpp +++ b/source/KeyboardConfig.cpp @@ -6,7 +6,7 @@ HARDWARE_IMPLEMENTATION KeyboardHardware; void led_set_crgb_at(uint8_t i, cRGB crgb) { KeyboardHardware.led_set_crgb_at(i,crgb); } -cRGB led_get_crgb_at(uint8_t i){ +cRGB led_get_crgb_at(uint8_t i) { KeyboardHardware.led_get_crgb_at(i); } void led_sync(void) { diff --git a/KeyboardConfig.h b/source/KeyboardConfig.h similarity index 100% rename from KeyboardConfig.h rename to source/KeyboardConfig.h diff --git a/KeyboardioFirmware.h b/source/KeyboardioFirmware.h similarity index 100% rename from KeyboardioFirmware.h rename to source/KeyboardioFirmware.h diff --git a/KeyboardioFirmware.ino b/source/KeyboardioFirmware.ino similarity index 100% rename from KeyboardioFirmware.ino rename to source/KeyboardioFirmware.ino diff --git a/LEDControl.cpp b/source/LEDControl.cpp similarity index 100% rename from LEDControl.cpp rename to source/LEDControl.cpp diff --git a/LEDControl.h b/source/LEDControl.h similarity index 100% rename from LEDControl.h rename to source/LEDControl.h diff --git a/Makefile b/source/Makefile similarity index 89% rename from Makefile rename to source/Makefile index a110bd64..b588bca2 100644 --- a/Makefile +++ b/source/Makefile @@ -5,17 +5,17 @@ BOARD = model01 MCU = atmega32u4 DEVICE_PORT := `ls /dev/cu.usbmodemHID??` -DEVICE_PORT := `ls /dev/cu.usbmodem14?1` -DEVICE_PORT_BOOTLOADER := `ls /dev/cu.usbmodem14?1` +DEVICE_PORT := `ls /dev/cu.usbmodem1A12411` +DEVICE_PORT_BOOTLOADER := `ls /dev/cu.usbmodem1A12411` ARDUINO_LIBS = GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always) -ARDUINO_PATH=/Applications/Arduino.app/Contents/Java/ +ARDUINO_PATH=~/Applications/Arduino.app/Contents/Java/ ARDUINO_TOOLS_PATH=$(ARDUINO_PATH)/hardware/tools FQBN=arduino:avr:leonardo BUILD_PATH := $(shell mktemp -d 2>/dev/null || mktemp -d -t 'build') -OUTPUT_PATH=./output -ARDUINO_LOCAL_LIB_PATH=~/Documents/Arduino/libraries +OUTPUT_PATH=../output +ARDUINO_LOCAL_LIB_PATH=../libraries ARDUINO_IDE_VERSION=100607 VERBOSE= #-verbose SKETCH=KeyboardioFirmware.ino diff --git a/MouseWrapper.cpp b/source/MouseWrapper.cpp similarity index 100% rename from MouseWrapper.cpp rename to source/MouseWrapper.cpp diff --git a/MouseWrapper.h b/source/MouseWrapper.h similarity index 100% rename from MouseWrapper.h rename to source/MouseWrapper.h diff --git a/Storage.cpp b/source/Storage.cpp similarity index 100% rename from Storage.cpp rename to source/Storage.cpp diff --git a/Storage.h b/source/Storage.h similarity index 100% rename from Storage.h rename to source/Storage.h diff --git a/generated/keymaps.h b/source/generated/keymaps.h similarity index 100% rename from generated/keymaps.h rename to source/generated/keymaps.h diff --git a/implementation/Model01.cpp b/source/implementation/Model01.cpp similarity index 100% rename from implementation/Model01.cpp rename to source/implementation/Model01.cpp diff --git a/implementation/Model01.h b/source/implementation/Model01.h similarity index 100% rename from implementation/Model01.h rename to source/implementation/Model01.h diff --git a/key_defs.h b/source/key_defs.h similarity index 100% rename from key_defs.h rename to source/key_defs.h diff --git a/key_events.cpp b/source/key_events.cpp similarity index 100% rename from key_events.cpp rename to source/key_events.cpp diff --git a/key_events.h b/source/key_events.h similarity index 100% rename from key_events.h rename to source/key_events.h diff --git a/keymaps.h b/source/keymaps.h similarity index 100% rename from keymaps.h rename to source/keymaps.h diff --git a/keyswitch_state.cpp b/source/keyswitch_state.cpp similarity index 100% rename from keyswitch_state.cpp rename to source/keyswitch_state.cpp diff --git a/keyswitch_state.h b/source/keyswitch_state.h similarity index 100% rename from keyswitch_state.h rename to source/keyswitch_state.h diff --git a/utils.cpp b/source/utils.cpp similarity index 100% rename from utils.cpp rename to source/utils.cpp diff --git a/utils.h b/source/utils.h similarity index 100% rename from utils.h rename to source/utils.h