Merge pull request #188 from cdisselkoen/virtual-hardware

Support for Kaleidoscope-Hardware-Virtual plugin
pull/189/head
Jesse Vincent 7 years ago committed by GitHub
commit 5facda8a65

@ -3,6 +3,11 @@
set -e set -e
firmware_size () { firmware_size () {
if [ "${BOARD}" = "virtual" ]; then
echo "[Size not computed for virtual build]"
return
fi
## This is a terrible hack, please don't hurt me. - algernon ## This is a terrible hack, please don't hurt me. - algernon
MAX_PROG_SIZE=28672 MAX_PROG_SIZE=28672
@ -137,7 +142,6 @@ compile () {
-ide-version "${ARDUINO_IDE_VERSION}" \ -ide-version "${ARDUINO_IDE_VERSION}" \
-warnings all \ -warnings all \
${ARDUINO_VERBOSE} \ ${ARDUINO_VERBOSE} \
-prefs "compiler.cpp.extra_flags=-std=c++11 -Woverloaded-virtual -Wno-unused-parameter -Wno-unused-variable -Wno-ignored-qualifiers ${ARDUINO_CFLAGS} ${LOCAL_CFLAGS}" \
${ARDUINO_AVR_GCC_PREFIX_PARAM} \ ${ARDUINO_AVR_GCC_PREFIX_PARAM} \
"$(find_sketch)/${SKETCH}.ino" "$(find_sketch)/${SKETCH}.ino"

@ -21,8 +21,11 @@ LIBRARY="${LIBRARY:-${SKETCH}}"
BOARD="${BOARD:-model01}" BOARD="${BOARD:-model01}"
MCU="${MCU:-atmega32u4}" MCU="${MCU:-atmega32u4}"
if [ "${BOARD}" = "virtual" ]; then
FQBN="${FQBN:-keyboardio:x86:${BOARD}}"
else
FQBN="${FQBN:-keyboardio:avr:${BOARD}}" FQBN="${FQBN:-keyboardio:avr:${BOARD}}"
fi
######## ########

@ -1,5 +1,10 @@
#include "hid.h" #include "hid.h"
#ifdef ARDUINO_VIRTUAL
#include "VirtualHID/VirtualHID.h"
#else
#include "KeyboardioHID.h" #include "KeyboardioHID.h"
#endif
namespace kaleidoscope { namespace kaleidoscope {
namespace hid { namespace hid {

@ -9,8 +9,11 @@
#include "key_defs_aliases.h" #include "key_defs_aliases.h"
#ifdef ARDUINO_VIRTUAL
#include "VirtualHID/VirtualHID.h"
#else
#include "KeyboardioHID.h" #include "KeyboardioHID.h"
#endif
typedef union Key_ { typedef union Key_ {

Loading…
Cancel
Save