From 5e4cc437931fb429f9187523de1cfac93e2cb80e Mon Sep 17 00:00:00 2001 From: root Date: Mon, 28 Dec 2015 11:28:47 +0000 Subject: add led and front-light tools --- front-light.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 front-light.c (limited to 'front-light.c') diff --git a/front-light.c b/front-light.c new file mode 100644 index 0000000..e331a26 --- /dev/null +++ b/front-light.c @@ -0,0 +1,19 @@ +#include +#include +#include +#include + +#define CM_FRONT_LIGHT_SET 241 + +main (int argc, char *argv[]) +{ + int fd; + fd = open ("/dev/ntx_io", O_RDWR); + + if (argc != 2) { + printf ("Usage:\n%s {0-100}\n", argv[0]); + exit (1); + } + + return ioctl (fd, CM_FRONT_LIGHT_SET, atoi (argv[1])); +} -- cgit v1.2.3