We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 752d9ed commit e137e4cCopy full SHA for e137e4c
recipes-devtools/android-tools/android-tools/arduino-android-gadget-setup
@@ -82,6 +82,29 @@ start()
82
stop()
83
{
84
echo "Removing Arduino usb gadgets..."
85
+
86
+ # go to configfs directory for USB gadgets
87
+ cd /sys/kernel/config/usb_gadget/g1
88
89
+ # Unbind the gadget
90
+ echo "" > UDC
91
92
+ # Remove all functions from configuration
93
+ find configs/c.1 -type l -exec rm {} \;
94
95
+ # Remove all function directories
96
+ rm -rf functions/*
97
98
+ # Remove configuration
99
+ rmdir configs/c.1/strings/0x409
100
+ rmdir configs/c.1
101
102
+ # Remove strings
103
+ rmdir strings/0x409
104
105
+ # Remove gadget directory
106
+ cd ..
107
+ rmdir g1
108
}
109
110
case "$1" in
0 commit comments