This commit is contained in:
2023-06-11 18:46:26 +08:00
commit 83ba21b0bd
161 changed files with 36383 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
/*
* drv_led.h
*
* Created on: Mar 31, 2023
* Author: gxms0
*/
#ifndef BSP_DRV_LED_H_
#define BSP_DRV_LED_H_
#include "ch32v20x.h"
typedef struct _leddef{
char *name;
uint16_t channel;
GPIO_TypeDef *GPIOx;
uint16_t GPIO_Pin;
uint8_t State;
uint32_t timeout;
struct _leddef *next_ptr;
}leddef;
void LED_Init(void);
void LED_install(leddef *e,char *name,GPIO_TypeDef *GPIOx,uint16_t GPIO_Pin,uint8_t State);
void LED_setOn(uint16_t channel);
void LED_setOff(uint16_t channel);
void LED_setToggle(uint16_t channel);
#endif /* BSP_DRV_LED_H_ */