31 lines
581 B
C
31 lines
581 B
C
/*
|
|
* bsp_motor.h
|
|
*
|
|
* Created on: 2024年11月30日
|
|
* Author: 123
|
|
*/
|
|
|
|
#ifndef INC_BSP_MOTOR_H_
|
|
#define INC_BSP_MOTOR_H_
|
|
|
|
#include "CH58x_common.h"
|
|
|
|
//extern uint8_t motor_state;
|
|
|
|
typedef struct state{
|
|
uint8_t motor_state; //点机开关状态
|
|
uint8_t dot_state; //点火状态
|
|
uint8_t off_state; //脱管状态
|
|
}valve_state;
|
|
extern valve_state valve_status;
|
|
#define COIL_ADC GPIO_Pin_5
|
|
#define COIL_A GPIO_Pin_1
|
|
#define COIL_B GPIO_Pin_0
|
|
|
|
void BSP_MOTOR_Init(void);
|
|
void VALVE_OPEN(void);
|
|
void VALVE_CLOSE(void);
|
|
void VALVE_STOP(void);
|
|
|
|
#endif /* INC_BSP_MOTOR_H_ */
|