6#ifndef HOMECORE_DRIVERS_LED_H
7#define HOMECORE_DRIVERS_LED_H
98 int (*set)(
void *device,
bool on);
100 int (*get)(
void *device,
bool *on);
void led_register_node(vfs_node_t *node, const char *path, const led_t *led)
Register the device file of an LED.
const led_table_t dt_led_table
The board's LEDs; generated in devicetree.c.
unsigned led_count(void)
Report how many LEDs the board describes.
int led_toggle(unsigned index)
Invert an LED.
int led_get(unsigned index, bool *on)
Read whether an LED is lit.
int led_set(unsigned index, bool on)
Turn an LED on or off.
Operations an LED driver provides; every one is required.
Definition led.h:96
An LED: driver operations bound to one device instance.
Definition led.h:104
const led_ops_t * ops
Operations of the LED's driver.
Definition led.h:106
void * device
Driver instance passed to every operation.
Definition led.h:108
Every LED in index order; generated in devicetree.c.
Definition led.h:112
const led_t * leds
The LEDs, or NULL when count is 0.
Definition led.h:114
unsigned count
Number of LEDs.
Definition led.h:116
Named entry in the VFS namespace.
Definition vfs.h:145
Virtual file system: device nodes, RAM files and directories, mounted filesystems,...