This commit is contained in:
2024-09-26 22:32:20 +08:00
commit 097089ef4e
323 changed files with 135661 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
/*
* 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_ */