如何通过修改配置文件的方式,切换USB MODE
Posted: 2025-04-22 14:55
如题,我尝试过修改luckfox.cfg中的USB_MODE,将值从host和peripheral中切换,然后重启。但是重启后仍然不会改变设备的USB_MODE.尽管luckfox.cfg中的值是修改后的。我知道可以通过luckfox-config来修改,但是我希望通过编程的方式更改USB状态。因此,我试图通过改luckfox.cfg,但是没有成功。
A short text to describe your forum
http://forums.luckfox.com/
Code: Select all
#==========other=============
elif [ "$1" == "usb" ]; then
luckfox_config_init
if [ -z "$2" ];then
luckfox_usb_app peripheral
fi
if [ "$2" == "host" ] && [ "$2" == "peripheral" ];then
luckfox_usb_app "$2"
fi
#==========other=============