From fece00803d9fe45d6a473a356610f6cbf89b49ca Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Fri, 23 Oct 2020 23:04:03 -0700 Subject: [PATCH] lift reset_device_command to the builder --- bin/kaleidoscope-builder | 15 +++++++++++++++ etc/kaleidoscope-builder.conf | 15 --------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/bin/kaleidoscope-builder b/bin/kaleidoscope-builder index 8c9c53f7..987c2122 100644 --- a/bin/kaleidoscope-builder +++ b/bin/kaleidoscope-builder @@ -256,6 +256,21 @@ prompt_before_flashing() { read } +reset_device_cmd() { + if [ -z ${NO_RESET} ]; then + if [ "${uname_S}" = "Darwin" ]; then + /bin/stty -f ${DEVICE_PORT} 1200 + elif [ "${uname_S}" = "FreeBSD" ]; then + /bin/stty -f ${DEVICE_PORT} 1200 + + elif [ "${uname_O}" = "Cygwin" ]; then + cmd /c mode ${DEVICE_COM_PORT} baud=1200 + else + stty -F ${DEVICE_PORT} 1200 hupcl + fi + fi +} + flash() { compile "$@" diff --git a/etc/kaleidoscope-builder.conf b/etc/kaleidoscope-builder.conf index e572b2a7..da4cd1f3 100644 --- a/etc/kaleidoscope-builder.conf +++ b/etc/kaleidoscope-builder.conf @@ -44,21 +44,6 @@ find_device_port() { fi } -reset_device_cmd() { - if [ -z ${NO_RESET} ]; then - if [ "${uname_S}" = "Darwin" ]; then - /bin/stty -f ${DEVICE_PORT} 1200 - elif [ "${uname_S}" = "FreeBSD" ]; then - /bin/stty -f ${DEVICE_PORT} 1200 - - elif [ "${uname_O}" = "Cygwin" ]; then - cmd /c mode ${DEVICE_COM_PORT} baud=1200 - else - stty -F ${DEVICE_PORT} 1200 hupcl - fi - fi -} - find_bootloader_ports() { if [ -n "${DEVICE_PORT_BOOTLOADER}" ]; then echo "DEVICE_PORT_BOOTLOADER=\"${DEVICE_PORT_BOOTLOADER}\" predefined."