working alpha version
This commit is contained in:
18
raspberry-pi/root/scripts/serial-wait.sh
Executable file
18
raspberry-pi/root/scripts/serial-wait.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
SERIAL_PORT="/dev/ttyGS0"
|
||||
stty -F "$SERIAL_PORT" raw
|
||||
|
||||
while true
|
||||
do
|
||||
if read -r line < "$SERIAL_PORT"
|
||||
then
|
||||
# wait for done message
|
||||
if [ "$line" = "DONE" ]
|
||||
then
|
||||
echo "" > /sys/kernel/config/usb_gadget/g1/UDC
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
sleep 0.5
|
||||
done
|
||||
Reference in New Issue
Block a user