屏幕控制完成

This commit is contained in:
2024-11-08 16:15:12 +08:00
parent 660ae1326f
commit 3da1fe761e
4 changed files with 26 additions and 4 deletions

13
pkg/utils/blank.go Normal file
View File

@@ -0,0 +1,13 @@
package utils
import "os"
// BlankOpen 打开屏幕
func BlankOpen() {
os.WriteFile("/sys/class/graphics/fb0/blank", []byte("0"), 0644)
}
// BlankClose 关闭屏幕
func BlankClose() {
os.WriteFile("/sys/class/graphics/fb0/blank", []byte("1"), 0644)
}