summaryrefslogtreecommitdiff
path: root/tools/reset_lufa_cdc
blob: 09cc8cb8ff6bac8643f8af675f1417010f9d1a2c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

DEVICE_FILE="/dev/ttyACM0"

if [ -c $DEVICE_FILE ]; then
    echo "resetting device .."
    echo $1 > /dev/ttyACM0

    echo "waiting for device to enumerate .."
    sleep 4
else
    echo "'$DEVICE_FILE' not found ... device is probably already in bootloader mode - doing nothing"
fi

exit 0