pwm ok
This commit is contained in:
@@ -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_ */
|
||||
Reference in New Issue
Block a user