mikroSDK Reference Manual
lv_led.h
Go to the documentation of this file.
1
6#ifndef LV_LED_H
7#define LV_LED_H
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13/*********************
14 * INCLUDES
15 *********************/
16#include "../../../lvgl.h"
17
18#if LV_USE_LED
19
20
21/*********************
22 * DEFINES
23 *********************/
25#ifndef LV_LED_BRIGHT_MIN
26# define LV_LED_BRIGHT_MIN 80
27#endif
28
30#ifndef LV_LED_BRIGHT_MAX
31# define LV_LED_BRIGHT_MAX 255
32#endif
33
34/**********************
35 * TYPEDEFS
36 **********************/
37
38/*Data of led*/
39typedef struct {
40 lv_obj_t obj;
41 lv_color_t color;
42 uint8_t bright;
43} lv_led_t;
44
45extern const lv_obj_class_t lv_led_class;
46
51typedef enum {
52 LV_LED_DRAW_PART_RECTANGLE,
53} lv_led_draw_part_type_t;
54
55/**********************
56 * GLOBAL PROTOTYPES
57 **********************/
58
64lv_obj_t * lv_led_create(lv_obj_t * parent);
65
71void lv_led_set_color(lv_obj_t * led, lv_color_t color);
72
78void lv_led_set_brightness(lv_obj_t * led, uint8_t bright);
79
84void lv_led_on(lv_obj_t * led);
85
90void lv_led_off(lv_obj_t * led);
91
96void lv_led_toggle(lv_obj_t * led);
97
103uint8_t lv_led_get_brightness(const lv_obj_t * obj);
104
105/**********************
106 * MACROS
107 **********************/
108
109#endif /*LV_USE_LED*/
110
111#ifdef __cplusplus
112} /*extern "C"*/
113#endif
114
115
116#endif /*LV_LED_H*/
Definition lv_obj_class.h:49
Definition lv_obj.h:174