summaryrefslogtreecommitdiffstats
path: root/front-light.c
blob: e331a26d9ad3d45d102d5b59f4b88fa1930253e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <fcntl.h>
#include <sys/ioctl.h>
#include <stdio.h>
#include <stdlib.h>

#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]));
}