summaryrefslogtreecommitdiff
path: root/tools/reset_lufa_cdc
blob: 6529884de3f7fa6da6fbb5222c199e243e23b5b9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/zsh --multios
#(c) Bernhard Tittelbach

LUFA_CDC_DEVS=($(${0:h}/detect_lufa_cdc))

if [[ ${#LUFA_CDC_DEVS} -gt 0 ]]; then
  echo "resetting device(s) $LUFA_CDC_DEVS ..."
  echo $1 > ${LUFA_CDC_DEVS}

  echo "waiting for device to enumerate .."
  sleep 3
else
  echo "LUFA ttyACMs not found ... device is probably already in bootloader mode - doing nothing"
fi

exit 0