Files
buildroot/board/miyoo/main/apps/usb-hid/usb-hid.sh
Apaczer 5c0a711fd2 BOARD/PKG: better LOGS in on OS scripts & add umtpr-debug (#169)
* firsboot/main - better LOGs
 - refactor a bit gmenu2x loop
 - add good logs for umtpr
* BOARD: options.cfg: add DEBUG options
 - use separate options for gmenu2x & umtpr debug
 - for default setup NO DEBUG
* PACKAGE: umtprd: add debug build
2025-05-21 21:37:11 +02:00

19 lines
554 B
Bash
Executable File

#!/bin/busybox sh
st_error_func(){
st -k -e "/bin/sh" "-c" "echo -e \"\e[31m${1}\e[0m\"; sleep 2"
}
st_exec_func(){
st -k -e "/bin/sh" "-c" "${1}"
}
echo peripheral > /sys/devices/platform/soc/1c13000.usb/musb-hdrc.1.auto/mode
killall umtprd umtprd-debug
/mnt/apps/usb-mtd/remove.sh g2
modprobe -r g_serial
mount none /sys/kernel/config -t configfs
gadget-hid
st_exec_func "\
echo -e \"\e[32m\n\n\n\n\n\n Starting USB-HID mode\e[0m\n\n\n\"; \
sleep 1; \
python /mnt/apps/usb-hid/usb-hid.py"
gadget-vid-pid-remove 0x1d6b:0x0104