双柱双电机S型传感器独立分支初始版本
This commit is contained in:
@@ -167,6 +167,18 @@
|
||||
#define CLR_RIGHTLOW_CS1237_SCLK() PORT_ResetBits(RIGHTLOW_CS1237_SCLK_PORTx, RIGHTLOW_CS1237_SCLK_PINx)//拉低
|
||||
#endif
|
||||
|
||||
//< BIT0
|
||||
#define TWIN_BIT0_PORTx (PortB)
|
||||
#define TWIN_BIT0_PINx (Pin12)
|
||||
#define SET_TWIN_BIT0() PORT_SetBits(TWIN_BIT0_PORTx, TWIN_BIT0_PINx)//拉高
|
||||
#define CLR_TWIN_BIT0() PORT_ResetBits(TWIN_BIT0_PORTx, TWIN_BIT0_PINx)//拉低
|
||||
|
||||
//< BIT1
|
||||
#define TWIN_BIT1_PORTx (PortB)
|
||||
#define TWIN_BIT1_PINx (Pin13)
|
||||
#define SET_TWIN_BIT1() PORT_SetBits(TWIN_BIT1_PORTx, TWIN_BIT1_PINx)//拉高
|
||||
#define CLR_TWIN_BIT1() PORT_ResetBits(TWIN_BIT1_PORTx, TWIN_BIT1_PINx)//拉低
|
||||
|
||||
typedef struct {
|
||||
uint32_t ControlLevel;//控制等级
|
||||
uint32_t DBGWaveOut;//调试波形输出
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
#define STOP_TIME_MS 500
|
||||
#define RUN_TIME_MS 0
|
||||
|
||||
#define BDC_STOP() Motor_Control(MOTOR_CMD_STOP)
|
||||
#define BDC_UP() Motor_Control(MOTOR_CMD_FORWARD)
|
||||
#define BDC_DOWN() Motor_Control(MOTOR_CMD_REVERSE)
|
||||
#define BDC_STOP() (SET_TWIN_BIT0(),SET_TWIN_BIT1())
|
||||
#define BDC_UP() (CLR_TWIN_BIT0(),SET_TWIN_BIT1())
|
||||
#define BDC_DOWN() (SET_TWIN_BIT0(),CLR_TWIN_BIT1())
|
||||
|
||||
/*控制等级*/
|
||||
typedef enum {
|
||||
|
||||
Reference in New Issue
Block a user