/**1* @file lv_led.h2*3*/45#ifndef LV_LED_H6#define LV_LED_H78#ifdef __cplusplus9extern "C" {10#endif1112/*********************13* INCLUDES14*********************/15#ifdef LV_CONF_INCLUDE_SIMPLE16#include "lv_conf.h"17#else18#include "../../lv_conf.h"19#endif2021#if USE_LV_LED != 02223#include "../lv_core/lv_obj.h"2425/*********************26* DEFINES27*********************/2829/**********************30* TYPEDEFS31**********************/3233/*Data of led*/34typedef struct35{36/*No inherited ext.*/37/*New data for this type */38uint8_t bright; /*Current brightness of the LED (0..255)*/39} lv_led_ext_t;4041/**********************42* GLOBAL PROTOTYPES43**********************/4445/**46* Create a led objects47* @param par pointer to an object, it will be the parent of the new led48* @param copy pointer to a led object, if not NULL then the new object will be copied from it49* @return pointer to the created led50*/51lv_obj_t * lv_led_create(lv_obj_t * par, const lv_obj_t * copy);5253/**54* Set the brightness of a LED object55* @param led pointer to a LED object56* @param bright 0 (max. dark) ... 255 (max. light)57*/58void lv_led_set_bright(lv_obj_t * led, uint8_t bright);5960/**61* Light on a LED62* @param led pointer to a LED object63*/64void lv_led_on(lv_obj_t * led);6566/**67* Light off a LED68* @param led pointer to a LED object69*/70void lv_led_off(lv_obj_t * led);7172/**73* Toggle the state of a LED74* @param led pointer to a LED object75*/76void lv_led_toggle(lv_obj_t * led);7778/**79* Set the style of a led80* @param led pointer to a led object81* @param style pointer to a style82*/83static inline void lv_led_set_style(lv_obj_t *led, lv_style_t *style)84{85lv_obj_set_style(led, style);86}8788/**89* Get the brightness of a LEd object90* @param led pointer to LED object91* @return bright 0 (max. dark) ... 255 (max. light)92*/93uint8_t lv_led_get_bright(const lv_obj_t * led);9495/**96* Get the style of an led object97* @param led pointer to an led object98* @return pointer to the led's style99*/100static inline lv_style_t* lv_led_get_style(const lv_obj_t *led)101{102return lv_obj_get_style(led);103}104105/**********************106* MACROS107**********************/108109#endif /*USE_LV_LED*/110111#ifdef __cplusplus112} /* extern "C" */113#endif114115#endif /*LV_LED_H*/116117118