Files
motor/Drivers/DRV/drv_led.h
T
2024-09-26 22:32:20 +08:00

44 lines
704 B
C

/*
* drv_led.h
*
* Created on: Mar 31, 2023
* Author: gxms0
*/
#ifndef BSP_DRV_LED_H_
#define BSP_DRV_LED_H_
#include "tim.h"
typedef struct _leddef{
char *name;
uint8_t channel;
uint16_t pad;
TIM_HandleTypeDef *htim;
uint32_t TIM_Channel;
uint32_t Light;
struct _leddef *next_ptr;
}leddef;
void led_init(void);
void led_config(leddef *e,char *name,TIM_HandleTypeDef *htim,uint32_t TIM_Channel,uint32_t Light);
void led_setOn(uint16_t channel);
void led_setOff(uint16_t channel);
void led_setToggle(uint16_t channel);
void led_setLight(uint16_t channel,uint32_t Light);
void led_setLightByName(char *name,uint32_t Light);
#endif /* BSP_DRV_LED_H_ */