|
libwebsockets
Lightweight C library for HTML5 websockets
|
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | lws_led_sequence_def_t |
| struct | lws_led_state_ch |
| struct | lws_led_state_chs |
| struct | lws_led_ops |
| struct | lws_led_gpio_map |
| struct | lws_led_gpio_controller |
Macros | |
| #define | LWS_LED_MAX_INTENSITY (0xffff) |
| #define | LWS_LED_FUNC_PHASE 65536 |
| #define | LWS_SEQ_LEDPHASE_TOTAL_ENDLESS (-1) |
| #define | LWS_LED_SEQUENCER_UPDATE_INTERVAL_MS 33 |
| #define | lws_led_gpio_ops |
Typedefs | |
| typedef uint16_t | lws_led_intensity_t |
| typedef uint16_t | lws_led_seq_phase_t |
| typedef lws_led_intensity_t(* | lws_led_lookup_t) (lws_led_seq_phase_t ph) |
| typedef struct lws_led_sequence_def_t | lws_led_sequence_def_t |
| typedef struct lws_led_state_ch | lws_led_state_ch_t |
| typedef struct lws_led_state_chs | lws_led_state_chs_t |
| typedef struct lws_led_ops | lws_led_ops_t |
| typedef struct lws_led_gpio_map | lws_led_gpio_map_t |
| typedef struct lws_led_gpio_controller | lws_led_gpio_controller_t |
Enumerations | |
| enum | { LLSI_CURR , LLSI_NEXT , LLSI_TRANS } |
Functions | |
| LWS_VISIBLE LWS_EXTERN struct lws_led_state * | lws_led_gpio_create (const lws_led_ops_t *led_ops) |
| LWS_VISIBLE LWS_EXTERN void | lws_led_gpio_destroy (struct lws_led_state *lcs) |
| LWS_VISIBLE LWS_EXTERN void | lws_led_gpio_intensity (const struct lws_led_ops *lo, const char *name, lws_led_intensity_t inten) |
| LWS_VISIBLE LWS_EXTERN int | lws_led_transition (struct lws_led_state *lcs, const char *name, const lws_led_sequence_def_t *next, const lws_led_sequence_def_t *trans) |
| struct lws_led_sequence_def_t |
Collaboration diagram for lws_led_sequence_def_t:| Data Fields | ||
|---|---|---|
| lws_led_lookup_t | func | |
| lws_led_seq_phase_t | ledphase_offset | |
| int | ledphase_total | |
| uint16_t | ms | |
| uint8_t | flags | |
| struct lws_led_state_ch |
Collaboration diagram for lws_led_state_ch:| Data Fields | ||
|---|---|---|
| const lws_led_sequence_def_t * | seq | |
| lws_led_seq_phase_t | ph | |
| lws_led_seq_phase_t | step | |
| int | phase_budget | |
| lws_led_intensity_t | last |
at the end of the sequence we decouple the sequencer, but leave the last computed sample behind for further transitions to base off |
| struct lws_led_state_chs |
| struct lws_led_ops |
Collaboration diagram for lws_led_ops:| Data Fields | ||
|---|---|---|
| void(*)(const struct lws_led_ops *lo, const char *name, lws_led_intensity_t inten) | intensity |
for BOOL led control like GPIO, only inten b15 is significant |
| struct lws_led_state *(*)(const struct lws_led_ops *led_ops) | create | |
| void(*)(struct lws_led_state *) | destroy | |
| struct lws_led_gpio_map |
Collaboration diagram for lws_led_gpio_map:| Data Fields | ||
|---|---|---|
| const char * | name | |
| _lws_plat_gpio_t | gpio | |
| lws_led_lookup_t | intensity_correction |
May be NULL. If GPIO-based LED, ignored. If pwm_ops provided, NULL means use default CIE 100% correction function. If non-NULL, use the pointed-to correction function. This is useful to provide LED-specific intensity correction / scaling so different types of LED can "look the same". |
| const struct lws_pwm_ops * | pwm_ops |
if NULL, gpio controls the led directly. If set to a pwm_ops, the led control is outsourced to the pwm controller. |
| uint8_t | active_level | |
| struct lws_led_gpio_controller |
Collaboration diagram for lws_led_gpio_controller:| Data Fields | ||
|---|---|---|
| const lws_led_ops_t | led_ops | |
| const lws_gpio_ops_t * | gpio_ops | |
| const lws_led_gpio_map_t * | led_map | |
| uint8_t | count_leds | |
| #define lws_led_gpio_ops |
Definition at line 140 of file lws-led.h.
| typedef uint16_t lws_led_intensity_t |
| typedef uint16_t lws_led_seq_phase_t |
| typedef lws_led_intensity_t(* lws_led_lookup_t) (lws_led_seq_phase_t ph) |
| typedef struct lws_led_sequence_def_t lws_led_sequence_def_t |
| typedef struct lws_led_state_ch lws_led_state_ch_t |
| typedef struct lws_led_state_chs lws_led_state_chs_t |
| typedef struct lws_led_ops lws_led_ops_t |
| typedef struct lws_led_gpio_map lws_led_gpio_map_t |
| typedef struct lws_led_gpio_controller lws_led_gpio_controller_t |
| anonymous enum |
| Enumerator | |
|---|---|
| LLSI_CURR | |
| LLSI_NEXT | |
| LLSI_TRANS | |
| LWS_VISIBLE LWS_EXTERN struct lws_led_state * lws_led_gpio_create | ( | const lws_led_ops_t * | led_ops | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN void lws_led_gpio_destroy | ( | struct lws_led_state * | lcs | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN void lws_led_gpio_intensity | ( | const struct lws_led_ops * | lo, |
| const char * | name, | ||
| lws_led_intensity_t | inten ) |
lws_led_gpio_intensity() - set the static intensity of an led
| lo | the base class of the led controller |
| index | which led in the controller set |
| inten | 16-bit unsigned intensity |
For LEDs controlled by a BOOL like GPIO, only inten b15 is significant. For PWM type LED control, as many bits as the hardware can support from b15 down are significant.
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_led_transition | ( | struct lws_led_state * | lcs, |
| const char * | name, | ||
| const lws_led_sequence_def_t * | next, | ||
| const lws_led_sequence_def_t * | trans ) |