25_R1_chassis/User/bsp/pwm.h

26 lines
724 B
C

#ifndef PWM_H
#define PWM_H
/* Includes ----------------------------------------------------------------- */
#include <stdint.h>
#include "bsp\bsp.h"
/* Exported constants ------------------------------------------------------- */
/* Exported macro ----------------------------------------------------------- */
/* Exported types ----------------------------------------------------------- */
/* PWM通道 */
typedef enum {
BSP_PWM_IMU_HEAT,
BSP_PWM_BUZZER,
} BSP_PWM_Channel_t;
/* Exported functions prototypes -------------------------------------------- */
int8_t BSP_PWM_Start(BSP_PWM_Channel_t ch);
int8_t BSP_PWM_Set(BSP_PWM_Channel_t ch, float duty_cycle);
int8_t BSP_PWM_Stop(BSP_PWM_Channel_t ch);
#endif