查看: 166|回复: 0

[经验] 飞凌嵌入式ElfBoard ELF1板卡-提示程序之背光脚本测试

[复制链接]

该用户从未签到

发表于 2024-12-10 16:57:53 | 显示全部楼层 |阅读模式
分享到:
backlight.sh:
  1. #! /bin/bash



  2. echo -e "\033[36m-----------BACKLIGHT--------------\033[0m"

  3. echo -e "\033[1;32mPress Esc to turn off the backlight\033[0m"

  4. ./continue.sh

  5. echo 0 > /sys/class/backlight/backlight/brightness





  6. echo -e "\033[1;32mPress Esc to turn on the backlight\033[0m"

  7. ./continue.sh

  8. echo 6 > /sys/class/backlight/backlight/brightness



  9. echo "Please enter y/n"

  10. read -sn 1 read_check

  11. if [ ! -n $read_check ]

  12. then

  13.         exit 0

  14. elif [ "$read_check" = "y" ]

  15. then

  16.         echo -e "\033[1;32mBACKLIGHT OK\033[0m"

  17. else

  18.         echo -e "\033[1;31mBACKLIGHT ERR\033[0m"

  19. fi
复制代码
  1. root@ELF1:~# chmod 777 backlight.sh

  2. root@ELF1:~# ./backlight.sh
复制代码
4-1.png


回复

使用道具 举报

您需要登录后才可以回帖 注册/登录

本版积分规则

关闭

站长推荐上一条 /4 下一条



手机版|小黑屋|与非网

GMT+8, 2024-12-18 20:44 , Processed in 0.110739 second(s), 16 queries , MemCache On.

ICP经营许可证 苏B2-20140176  苏ICP备14012660号-2   苏州灵动帧格网络科技有限公司 版权所有.

苏公网安备 32059002001037号

Powered by Discuz! X3.4

Copyright © 2001-2024, Tencent Cloud.