2025-05-06 17:18:00 +08:00
|
|
|
#ifndef __MW_MOTOR_H__
|
|
|
|
#define __MW_MOTOR_H__
|
|
|
|
|
2025-05-06 22:53:45 +08:00
|
|
|
#include <stdint.h>
|
2025-05-06 17:18:00 +08:00
|
|
|
|
2025-05-06 22:53:45 +08:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
motor_state_stop = 0,
|
|
|
|
motor_state_goAhead,
|
|
|
|
motor_state_goBack,
|
|
|
|
motor_state_turnLeft,
|
|
|
|
motor_state_turnRight,
|
|
|
|
motor_state_selfLeft,
|
|
|
|
motor_state_selfRight,
|
|
|
|
motor_state_NUM,
|
|
|
|
|
|
|
|
}motor_state_ENUM;
|
|
|
|
|
|
|
|
|
|
|
|
void mw_motor_goAhead(int8_t speed);
|
|
|
|
void mw_motor_goBack(int8_t speed);
|
|
|
|
void mw_motor_turnLeft(int8_t speed);
|
|
|
|
void mw_motor_turnRight(int8_t speed);
|
|
|
|
void mw_motor_selfLeft(int8_t speed);
|
|
|
|
void mw_motor_selfRight(int8_t speed);
|
|
|
|
void mw_motor_stop(void);
|
2025-05-06 17:18:00 +08:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|