// // Created by SJQ on 2024/5/11. // #ifndef BASIC_FRAMEWORK_AIR_PUMP_H #define BASIC_FRAMEWORK_AIR_PUMP_H #include "main.h" #include "tim.h" #include typedef struct { // 使用的定时器类型及通道 TIM_HandleTypeDef *htim; /*Channel值设定 *TIM_CHANNEL_1 *TIM_CHANNEL_2 *TIM_CHANNEL_3 *TIM_CHANNEL_4 *TIM_CHANNEL_ALL */ uint32_t Channel; } PumpInstance; PumpInstance *PumpInit(TIM_HandleTypeDef *htim,uint32_t Channel); void Pump_open(PumpInstance *pump); void Pump_stop(PumpInstance *pump); #endif //BASIC_FRAMEWORK_AIR_PUMP_H