lv_led.h
API reference for lv_led.h
See Also: Private HeaderThis header has a companion private implementation with internal data structures.lv_led_private.h
Functions
public/widgets/lv_led.h:64function
lv_led_set_color
Set the color of the LED
void lv_led_set_color(lv_obj_t *obj, lv_color_t color)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a LED object |
color | lv_color_t | the color of the LED |
public/widgets/lv_led.h:71function
lv_led_set_brightness
Set the brightness of a LED object
void lv_led_set_brightness(lv_obj_t *obj, uint8_t bright)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a LED object |
bright | uint8_t | LV_LED_BRIGHT_MIN (max. dark) ... LV_LED_BRIGHT_MAX (max. light) |
public/widgets/lv_led.h:96function
lv_led_get_brightness
Get the brightness of a LED object
uint8_t lv_led_get_brightness(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to LED object |
Returns: uint8_t — bright 0 (max. dark) ... 255 (max. light)
public/widgets/lv_led.h:103function
lv_led_get_color
Get the color of a LED object
lv_color_t lv_led_get_color(const lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | const lv_obj_t * | pointer to LED object |
Returns: lv_color_t — color color of the LED
public/widgets/lv_led.h:57function
lv_led_create
Create a led object
lv_obj_t * lv_led_create(lv_obj_t *parent)| Name | Type | Description |
|---|---|---|
parent | lv_obj_t * | pointer to a parent widget May be NULL.. When NULL, the widget is created as a screen on the default display. |
Returns: lv_obj_t * — pointer to the created led
public/widgets/lv_led.h:77function
lv_led_on
Light on a LED
void lv_led_on(lv_obj_t *led)| Name | Type | Description |
|---|---|---|
led | lv_obj_t * | pointer to a LED object |
public/widgets/lv_led.h:83function
lv_led_off
Light off a LED
void lv_led_off(lv_obj_t *led)| Name | Type | Description |
|---|---|---|
led | lv_obj_t * | pointer to a LED object |
public/widgets/lv_led.h:89function
lv_led_toggle
Toggle the state of a LED
void lv_led_toggle(lv_obj_t *obj)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a LED object |
Enums
_lv_property_led_id_t
| Name | Value |
|---|---|
LV_PROPERTY_LED_COLOR | (LV_PROPERTY_LED_START + ((int) 0 )) | (( 3 ) << 28 ) |
LV_PROPERTY_LED_BRIGHTNESS | (LV_PROPERTY_LED_START + ((int) 1 )) | (( 1 ) << 28 ) |
LV_PROPERTY_LED_END |
Macros
LV_LED_BRIGHT_MIN
#define LV_LED_BRIGHT_MIN 80Brightness when the LED if OFF
LV_LED_BRIGHT_MAX
#define LV_LED_BRIGHT_MAX 255Brightness when the LED if ON
Variables
public/widgets/lv_led.h:37variable
lv_led_class
const lv_obj_class_t lv_led_classDependencies
Indirect dependencies
lv_anim.hlv_area.hlv_assert.hlv_bidi.hlv_color.hlv_color_op.hlv_conf_internal.hlv_display.hlv_draw.hlv_draw_arc.hlv_draw_blur.hlv_draw_buf.hlv_draw_image.hlv_draw_label.hlv_draw_line.hlv_draw_rect.hlv_draw_triangle.hlv_event.hlv_ext_data.hlv_flex.hlv_font.hlv_fs.hlv_grad.hlv_grid.hlv_group.hlv_image_decoder.hlv_image_dsc.hlv_indev.hlv_layout.hlv_log.hlv_math.hlv_matrix.hlv_mem.hlv_obj_class.hlv_obj_draw.hlv_obj_event.hlv_obj_pos.hlv_obj_property.hlv_obj_scroll.hlv_obj_style.hlv_obj_style_gen.hlv_obj_tree.hlv_palette.hlv_profiler.hlv_profiler_builtin.hlv_sprintf.hlv_string.hlv_style.hlv_style_gen.hlv_symbol_def.hlv_text.hlv_timer.hlv_types.h
Last updated on