59 lines
861 B
C
59 lines
861 B
C
#ifndef __MW_LED_H__
|
|
#define __MW_LED_H__
|
|
|
|
#include "stm32f10x.h"
|
|
|
|
typedef enum
|
|
{
|
|
Led0 = 0,
|
|
Led1,
|
|
|
|
led_num
|
|
}led_type_enum;
|
|
|
|
|
|
typedef struct
|
|
{
|
|
led_type_enum led_drv;
|
|
void (*init)(void);
|
|
void (*on)(void);
|
|
void (*off)(void);
|
|
}mw_led_t;
|
|
|
|
mw_led_t mw_get_led_obj(led_type_enum e_led_type);
|
|
|
|
void mw_led_drv_init(void);
|
|
|
|
// typedef struct
|
|
// {
|
|
// void * gpio_type;
|
|
// void * gpio_pin;
|
|
// int8_t (*pf_init)(void);
|
|
// int8_t (*pf_deinit)(void);
|
|
// int8_t (*pf_set_bits)(uint16_t set_val);
|
|
// uint16_t (*pf_get_bits)(void);
|
|
|
|
// }gpio_interface_t;
|
|
|
|
// typedef struct
|
|
// {
|
|
// void (*delay_init)(void);
|
|
// void (*delay_us)(uint32_t nus);
|
|
// void (*delay_ms)(uint32_t nms);
|
|
// }system_interface_t;
|
|
|
|
// typedef enum {
|
|
// Led1,
|
|
// Led2,
|
|
// }led_type_t;
|
|
|
|
// typedef struct
|
|
// {
|
|
// led_obj_t
|
|
|
|
// }
|
|
|
|
|
|
|
|
#endif
|