|
|
|
@ -10,8 +10,10 @@ LIBRARY="${LIBRARY:-${SKETCH}}"
|
|
|
|
|
######## Keyboard hardware definitions
|
|
|
|
|
########
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# These should be pulled from Arduino boards.txt
|
|
|
|
|
VID="${VID:-1209}"
|
|
|
|
|
BOOTLOADER_PID="${BOOTLOADER_PID:-2300}"
|
|
|
|
|
SKETCH_PID="${SKEYCH_PID:-2301}"
|
|
|
|
|
BOARD="${BOARD:-model01}"
|
|
|
|
|
MCU="${MCU:-atmega32u4}"
|
|
|
|
|
if [ "${BOARD}" = "virtual" ]; then
|
|
|
|
@ -31,24 +33,43 @@ fi
|
|
|
|
|
uname_S=$(uname -s 2>/dev/null || echo not)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DEVICE_PORT="$(ls /dev/ttyACM* 2>/dev/null || echo '')"
|
|
|
|
|
RESET_DEVICE="stty -F ${DEVICE_PORT} 1200 hupcl"
|
|
|
|
|
find_device_port() {
|
|
|
|
|
DIR=$(dirname "$(readlink -f "$0")")
|
|
|
|
|
DEVICE_PORT_PROBER="${DIR}/find-device-port-linux-udev"
|
|
|
|
|
DEVICE_PORT="$(perl ${DEVICE_PORT_PROBER} ${VID} ${SKETCH_PID})"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
reset_device_cmd() {
|
|
|
|
|
stty -F ${DEVICE_PORT} 1200 hupcl
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MD5="md5sum"
|
|
|
|
|
|
|
|
|
|
find_bootloader_ports() {
|
|
|
|
|
DEVICE_PORT_BOOTLOADER="$(ls /dev/ttyACM* 2>/dev/null || echo '')"
|
|
|
|
|
DIR=$(dirname "$(readlink -f "$0")")
|
|
|
|
|
DEVICE_PORT_PROBER="${DIR}/find-device-port-linux-udev"
|
|
|
|
|
DEVICE_PORT_BOOTLOADER="$(perl ${DEVICE_PORT_PROBER} ${VID} ${BOOTLOADER_PID})"
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "${uname_S}" = "Darwin" ]; then
|
|
|
|
|
|
|
|
|
|
find_device_port() {
|
|
|
|
|
DEVICE_PORT="$(ls /dev/cu.usbmodemkbio* 2> /dev/null || echo '')"
|
|
|
|
|
DEVICE_PORT="${DEVICE_PORT:-$(ls /dev/cu.usbmodemCkbio* 2> /dev/null || echo '')}"
|
|
|
|
|
DEVICE_PORT="${DEVICE_PORT:-$(ls /dev/cu.usbmodemHID* 2> /dev/null || echo '')}"
|
|
|
|
|
DEVICE_PORT="${DEVICE_PORT:-$(ls /dev/cu.usbmodemCHID* 2> /dev/null || echo '')}"
|
|
|
|
|
DEVICE_PORT="${DEVICE_PORT:-$(ls /dev/cu.usbmodem14* 2> /dev/null || echo '')}"
|
|
|
|
|
RESET_DEVICE="/bin/stty -f ${DEVICE_PORT} 1200"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
reset_device_cmd() {
|
|
|
|
|
/bin/stty -f ${DEVICE_PORT} 1200
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ARDUINO_PATH="${ARDUINO_PATH:-/Applications/Arduino.app/Contents/Java/}"
|
|
|
|
|