#include "leds.h"
#include <errno.h>
#include <stdio.h>
#include <sysfs/libsysfs.h>
#include <stdlib.h>
Functions | |
static int | g13_device_get_minor (g13_device *device) |
static char * | g13_create_led_path (g13_device *device, G13_LED which) |
int | g13_device_get_led (g13_device *device, int which) |
Get the specified LED state. | |
int | g13_device_set_led (g13_device *device, int which, int enabled) |
Set the specified led light state. |
static char* g13_create_led_path | ( | g13_device * | device, | |
G13_LED | which | |||
) | [static] |
References g13_device_get_minor(), and g13_device_get_syspath().
Referenced by g13_device_get_led(), and g13_device_set_led().
int g13_device_get_led | ( | g13_device * | device, | |
int | which | |||
) |
Get the specified LED state.
0
if off; 1
if on References g13_create_led_path(), and G13_LED_MR.
Referenced by g13_device_get_state(), and G13::Device::led().
static int g13_device_get_minor | ( | g13_device * | device | ) | [static] |
References g13_device_get_syspath().
Referenced by g13_create_led_path().
int g13_device_set_led | ( | g13_device * | device, | |
int | which, | |||
int | enabled | |||
) |
Set the specified led light state.
0
if successfully set; on error returns -1
and sets errno
enabled | 0 to turn off the led, nonzero to turn on the led |
References g13_create_led_path(), and G13_LED_MR.
Referenced by G13::Device::set_led(), G13::Device::set_m1(), G13::Device::set_m2(), G13::Device::set_m3(), and G13::Device::set_mr().