From 516d617cce1da40dfa58e2ce645d3229d7101d32 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sat, 26 Nov 2016 07:46:07 +0100 Subject: [PATCH] Move macros to a separate library Signed-off-by: Gergely Nagy --- examples/KeyboardioFirmware/KeyboardioFirmware.ino | 1 + libraries/Keyboardio-Macros/library.properties | 9 +++++++++ .../Keyboardio-Macros/src/Keyboardio-Macros.cpp | 3 +-- .../Keyboardio-Macros/src/Keyboardio-Macros.h | 3 +-- src/key_events.h | 1 - 5 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 libraries/Keyboardio-Macros/library.properties rename src/Macros.cpp => libraries/Keyboardio-Macros/src/Keyboardio-Macros.cpp (91%) rename src/Macros.h => libraries/Keyboardio-Macros/src/Keyboardio-Macros.h (92%) diff --git a/examples/KeyboardioFirmware/KeyboardioFirmware.ino b/examples/KeyboardioFirmware/KeyboardioFirmware.ino index 2b0dc9a6..9bec056d 100644 --- a/examples/KeyboardioFirmware/KeyboardioFirmware.ino +++ b/examples/KeyboardioFirmware/KeyboardioFirmware.ino @@ -5,6 +5,7 @@ #define DEBUG_SERIAL false #include "Keyboardio-MouseKeys.h" +#include "Keyboardio-Macros.h" #include "KeyboardioFirmware.h" #include "generated/keymaps.h" diff --git a/libraries/Keyboardio-Macros/library.properties b/libraries/Keyboardio-Macros/library.properties new file mode 100644 index 00000000..15fbbe7a --- /dev/null +++ b/libraries/Keyboardio-Macros/library.properties @@ -0,0 +1,9 @@ +name=Keyboardio-Macros +version=0.0.1 +author=Jesse Vincent +maintainer=Jesse Vincent +sentence=Macro keys for Keyboardio boards. +paragraph=... +category=Communication +url=https://github.com/keyboardio/KeyboardioFirmware +architectures=avr diff --git a/src/Macros.cpp b/libraries/Keyboardio-Macros/src/Keyboardio-Macros.cpp similarity index 91% rename from src/Macros.cpp rename to libraries/Keyboardio-Macros/src/Keyboardio-Macros.cpp index 2602dca4..b492d8eb 100644 --- a/src/Macros.cpp +++ b/libraries/Keyboardio-Macros/src/Keyboardio-Macros.cpp @@ -1,5 +1,4 @@ -#include "Macros.h" -#include "hooks.h" +#include "Keyboardio-Macros.h" __attribute__((weak)) void diff --git a/src/Macros.h b/libraries/Keyboardio-Macros/src/Keyboardio-Macros.h similarity index 92% rename from src/Macros.h rename to libraries/Keyboardio-Macros/src/Keyboardio-Macros.h index 12c4e352..df209872 100644 --- a/src/Macros.h +++ b/libraries/Keyboardio-Macros/src/Keyboardio-Macros.h @@ -1,7 +1,6 @@ #pragma once -#include -#include "key_defs.h" +#include #define IS_MACRO B00000001 diff --git a/src/key_events.h b/src/key_events.h index ec917b48..d7128a1b 100644 --- a/src/key_events.h +++ b/src/key_events.h @@ -8,7 +8,6 @@ #include "Storage.h" #include "keymap_metadata.h" #include "hooks.h" -#include "Macros.h" //static const Key keymaps[KEYMAPS][ROWS][COLS]; extern uint8_t primary_keymap;