config文件
CONFIG_LEDS_TRIGGER_TIMER=y
CONFIG_LEDS_GPIO=y
DTS
led1 {
label = "psst:led:button1";
linux,default-trigger = "timer";
gpios = <&pio 4 7 GPIO_ACTIVE_LOW>; // PE7
retain-state-suspended;
};
我想实现自定义的闪烁,心跳闪烁时间似乎不能自定义,我找了网上的帖子,用echo timer不行
# echo timer > /sys/class/leds/psst:led:button1/trigger
sh: write error: Invalid argument
# cat /sys/class/leds/psst:led:button1/trigger
[none] kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock mmc0 mmc1 heartbeat default-on
发现没有timer这个参数,另外网上说的delay_on delay_off也没有,我要如何让灯闪起来呢?
离线