first commit

This commit is contained in:
zhaohengze
2026-05-14 17:53:52 +08:00
commit e1ffcf2e7d
156 changed files with 109026 additions and 0 deletions

View File

@ -0,0 +1,14 @@
#!/bin/bash
TTY_DEVICE="/dev/ttyACM0"
# 参数为 "poweroff", "halt", "reboot"等
ACTION=$1
# 当关机(poweroff)或重启(reboot)时才发送
if [ "$ACTION" = "poweroff" ] ; then
if [ -w "$TTY_DEVICE" ]; then
stty -F "$TTY_DEVICE" 115200 cs8 -cstopb -parenb
printf "ok\r\n" > "$TTY_DEVICE"
fi
fi
exit 0