2024-07-11 06:58:55 +00:00
|
|
|
|
/*************************************************
|
|
|
|
|
Copyright
|
|
|
|
|
File name: pwm.h
|
|
|
|
|
Author:
|
|
|
|
|
Version: V0.1
|
|
|
|
|
Date: 2024/4/27
|
|
|
|
|
*************************************************/
|
|
|
|
|
|
|
|
|
|
#ifndef __PWM_H
|
|
|
|
|
#define __PWM_H
|
|
|
|
|
|
|
|
|
|
#include "ch32l103.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define Prescaler 0
|
|
|
|
|
/* <20><><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5>Ϊ240M */
|
|
|
|
|
#define Period 200 - 1
|
2024-08-05 02:35:10 +00:00
|
|
|
|
//#define Period 20000 - 1
|
2024-07-11 06:58:55 +00:00
|
|
|
|
|
|
|
|
|
void PWM_TIM_Configuration(void);
|
2024-08-05 02:35:10 +00:00
|
|
|
|
void Set_duty_ratio(float *duty_ratio);
|
2024-07-11 06:58:55 +00:00
|
|
|
|
|
|
|
|
|
#endif
|