lift reset_device_command to the builder

tmp/arduino-cli-pre-rebase
Jesse Vincent 4 years ago
parent 50f66a5b10
commit fece00803d
No known key found for this signature in database
GPG Key ID: CC228463465E40BC

@ -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 "$@"

@ -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."

Loading…
Cancel
Save