motor_drv_wrapper.h

来自「简单双马达玩具车驱动 包装~」· C头文件 代码 · 共 78 行

H
78
字号
/**********************************************************************
**
**          Copyright (c) 2008 -- Michael.All right received.
**
**          PROJECT: Tangtang's Graduation Design
**
**          PURPOSE: Head file for motor_drv_wrapper.c.
**
**          DATE : 05/18/2008
**
**          AUTHOR: Michael
**
**          SCHOOL: CUIT
**
**          FILENAME: motor_drv_wrapper.h
**
**********************************************************************/

#ifndef MOTOR_DRIVER_WRAPPER_H
#define MOTOR_DRIVER_WRAPPER_H

#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */


/* Include files. */

#include "typedef.h"
#include "main.h"

/* Macro constant definitions. */


/* Type definitions. */

#define MOVE_FOREVER -1

typedef enum
{
    E_MOTOR_LEFT,
    E_MOTOR_RIGHT,
} eMotor;

typedef enum
{
    E_MOTOR_RUN_TYPE_MOVE_FORWARD,
    E_MOTOR_RUN_TYPE_MOVE_BACKWARD,
} eMotorRunType;

typedef enum
{
    E_MOTOR_OPT_TYPE_DISTANCE,
    E_MOTOR_OPT_TYPE_TIME,
} eMotorOptType;


/* External function declarations. */

eOsReturn MotorRun(eMotor moter, eMotorOptType optType,
  eMotorRunType runType, int32 arg);
eOsReturn MotorStop(eMotor moter);

/* Macro API definitions. */


/* Global variable declarations. */



#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */

#endif /* MOTOR_DRIVER_WRAPPER_H */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?