g13 tux logo   g13

leds.c File Reference

#include "leds.h"
#include <errno.h>
#include <stdio.h>
#include <sysfs/libsysfs.h>
#include <stdlib.h>
Include dependency graph for leds.c:

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.

Function Documentation

static char* g13_create_led_path ( g13_device device,
G13_LED  which 
) [static]
int g13_device_get_led ( g13_device device,
int  which 
)

Get the specified LED state.

Returns:
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.

Returns:
0 if successfully set; on error returns -1 and sets errno
Parameters:
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().


Generated on Wed Mar 24 10:13:18 2010 for g13 by doxygen 1.6.1