ONLP
Open Network Linux Platform APIs
|
LED Management. More...
Go to the source code of this file.
Data Structures | |
struct | onlp_led_info_s |
Macros | |
#define | ONLP_LED_CAPS_VALID(_e) (onlp_led_caps_valid((_e))) |
#define | ONLP_LED_MODE_STRINGS |
#define | ONLP_LED_MODE_VALID(_e) ( (0 <= (_e)) && ((_e) <= ONLP_LED_MODE_PURPLE_BLINKING)) |
Typedefs | |
typedef enum onlp_led_caps_e | onlp_led_caps_t |
typedef enum onlp_led_mode_e | onlp_led_mode_t |
typedef struct onlp_led_info_s | onlp_led_info_t |
Enumerations | |
enum | onlp_led_caps_e { ONLP_LED_CAPS_OFF = (1 << 0), ONLP_LED_CAPS_AUTO = (1 << 1), ONLP_LED_CAPS_AUTO_BLINKING = (1 << 2), ONLP_LED_CAPS_CHAR = (1 << 3), ONLP_LED_CAPS_RED = (1 << 4), ONLP_LED_CAPS_RED_BLINKING = (1 << 5), ONLP_LED_CAPS_ORANGE = (1 << 6), ONLP_LED_CAPS_ORANGE_BLINKING = (1 << 7), ONLP_LED_CAPS_YELLOW = (1 << 8), ONLP_LED_CAPS_YELLOW_BLINKING = (1 << 9), ONLP_LED_CAPS_GREEN = (1 << 10), ONLP_LED_CAPS_GREEN_BLINKING = (1 << 11), ONLP_LED_CAPS_BLUE = (1 << 12), ONLP_LED_CAPS_BLUE_BLINKING = (1 << 13), ONLP_LED_CAPS_PURPLE = (1 << 14), ONLP_LED_CAPS_PURPLE_BLINKING = (1 << 15) } |
enum | onlp_led_mode_e { ONLP_LED_MODE_OFF, ONLP_LED_MODE_AUTO, ONLP_LED_MODE_AUTO_BLINKING, ONLP_LED_MODE_CHAR, ONLP_LED_MODE_RED, ONLP_LED_MODE_RED_BLINKING, ONLP_LED_MODE_ORANGE, ONLP_LED_MODE_ORANGE_BLINKING, ONLP_LED_MODE_YELLOW, ONLP_LED_MODE_YELLOW_BLINKING, ONLP_LED_MODE_GREEN, ONLP_LED_MODE_GREEN_BLINKING, ONLP_LED_MODE_BLUE, ONLP_LED_MODE_BLUE_BLINKING, ONLP_LED_MODE_PURPLE, ONLP_LED_MODE_PURPLE_BLINKING, ONLP_LED_MODE_LAST = ONLP_LED_MODE_PURPLE_BLINKING, ONLP_LED_MODE_COUNT, ONLP_LED_MODE_INVALID = -1 } |
Functions | |
int | onlp_led_sw_init (void) |
Software initialization of the LED module. | |
int | onlp_led_hw_init (uint32_t flags) |
Hardware initialization of the LED module. | |
int | onlp_led_sw_denit (void) |
Deinitialize the led software module. More... | |
int | onlp_led_hdr_get (onlp_oid_t oid, onlp_oid_hdr_t *rv) |
Get the LED header. More... | |
int | onlp_led_info_get (onlp_oid_t oid, onlp_led_info_t *rv) |
Get LED information. More... | |
int | onlp_led_caps_get (onlp_oid_t oid, uint32_t *caps) |
Get the LED caps. More... | |
int | onlp_led_mode_set (onlp_oid_t oid, onlp_led_mode_t mode) |
Set the LED mode. More... | |
int | onlp_led_char_set (onlp_oid_t oid, char c) |
Set the LED char. More... | |
int | onlp_led_info_to_user_json (onlp_led_info_t *info, cJSON **cj, uint32_t flags) |
Convert an LED info structure to user JSON. More... | |
int | onlp_led_info_to_json (onlp_led_info_t *info, cJSON **cj, uint32_t flags) |
Convert an LED info structure to JSON. More... | |
int | onlp_led_info_from_json (cJSON *cj, onlp_led_info_t *info) |
Convert a JSON object to an LED info structure. More... | |
const char * | onlp_led_caps_name (onlp_led_caps_t e) |
int | onlp_led_caps_value (const char *str, onlp_led_caps_t *e, int substr) |
const char * | onlp_led_caps_desc (onlp_led_caps_t e) |
int | onlp_led_caps_valid (onlp_led_caps_t e) |
const char * | onlp_led_mode_name (onlp_led_mode_t e) |
int | onlp_led_mode_value (const char *str, onlp_led_mode_t *e, int substr) |
const char * | onlp_led_mode_desc (onlp_led_mode_t e) |
Variables | |
aim_map_si_t | onlp_led_caps_map [] |
aim_map_si_t | onlp_led_caps_desc_map [] |
aim_map_si_t | onlp_led_mode_map [] |
aim_map_si_t | onlp_led_mode_desc_map [] |
LED Management.