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
|
2024-08-17 03:14:19 +00:00
|
|
|
|
/* <20><><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5>Ϊ240k */
|
|
|
|
|
//#define Period 200 - 1
|
|
|
|
|
#define Period 480 - 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
|