Source code rearrangement

Moved the library sources into src/, and the sketch into examples/. This
makes it easier to use the project as a library, and the default
firmware sketch shows up in Arduino IDE's Files/Examples menu. This in
turn, has a very neat side effect: an end user can start from this
example, and when they save it, it will be saved to their Sketchbook,
and the library can be updated independently, without having to worry
about conflicts.

Having the Sketch separate from the sources also paves the way for
moving the keymap there.

As far as Arduino IDE dependencies go: this requires Arduino IDE 1.6.7+,
the same minimum version required previously.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
pull/28/head
Gergely Nagy 8 years ago
parent a5f3b98c79
commit bd35e8dfed

@ -38,8 +38,8 @@ astyle:
find . -type f -name \*.h |xargs -n 1 astyle --style=google find . -type f -name \*.h |xargs -n 1 astyle --style=google
generate-keymaps: generate-keymaps:
-rm generated/keymaps.h -rm src/generated/keymaps.h
cd layouts && ( find . -type f |xargs -n 1 -I % sh -c 'perl ../tools/generate_keymaps.pl < % >> ../generated/keymaps.h' ) cd layouts && ( find . -type f |xargs -n 1 -I % sh -c 'perl ../tools/generate_keymaps.pl < % >> ../src/generated/keymaps.h' )
dirs: dirs:
mkdir -p $(OUTPUT_PATH) mkdir -p $(OUTPUT_PATH)
@ -52,10 +52,11 @@ compile: dirs
-tools $(ARDUINO_PATH)/tools-builder \ -tools $(ARDUINO_PATH)/tools-builder \
-fqbn $(FQBN) \ -fqbn $(FQBN) \
-libraries $(ARDUINO_LOCAL_LIB_PATH) \ -libraries $(ARDUINO_LOCAL_LIB_PATH) \
-libraries . \
$(VERBOSE) \ $(VERBOSE) \
-build-path $(BUILD_PATH) \ -build-path $(BUILD_PATH) \
-ide-version $(ARDUINO_IDE_VERSION) \ -ide-version $(ARDUINO_IDE_VERSION) \
$(SKETCH) examples/KeyboardioFirmware/$(SKETCH)
@cp $(BUILD_PATH)/$(SKETCH).hex $(HEX_FILE_PATH) @cp $(BUILD_PATH)/$(SKETCH).hex $(HEX_FILE_PATH)
@cp $(BUILD_PATH)/$(SKETCH).elf $(ELF_FILE_PATH) @cp $(BUILD_PATH)/$(SKETCH).elf $(ELF_FILE_PATH)
@echo "Firmware is available at $(HEX_FILE_PATH)" @echo "Firmware is available at $(HEX_FILE_PATH)"

@ -0,0 +1,10 @@
name=KeyboardioFirmware
version=0.0.1
author=Jesse Vincent
maintainer=Jesse Vincent <jesse@keyboard.io>
sentence=Firmware for the Keyboardio Model 01.
paragraph=...
category=Communication
url=https://github.com/keyboardio/KeyboardioFirmware
architectures=avr
dot_a_linkage=true
Loading…
Cancel
Save