30 lines
429 B
C
30 lines
429 B
C
#ifndef __LED_DRV_IF_H__
|
|
#define __LED_DRV_IF_H__
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
#include <stdbool.h>
|
|
|
|
struct led_color
|
|
{
|
|
uint8_t B;
|
|
uint8_t G;
|
|
uint8_t R;
|
|
};
|
|
|
|
typedef struct
|
|
{
|
|
int32_t (*init)(uint32_t cnt);
|
|
int32_t (*set)(uint32_t idx, struct led_color color, uint8_t brightness);
|
|
} led_drv_if_t;
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* ! __LED_DRV_IF_H__ */
|