📄 typedef.h
字号:
/**********************************************************************
**
** Copyright (c) 2008 -- Michael.All right received.
**
** PROJECT: Tangtang's Graduation Design
**
** PURPOSE: Head file for type define.
**
** DATE : 05/18/2008
**
** AUTHOR: Michael
**
** SCHOOL: CUIT
**
** FILENAME: typedef.h
**
**********************************************************************/
#ifndef TYPE_DEF_H
#define TYPE_DEF_H
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
/* Include files. */
#include <stdio.h>
/* Macro constant definitions. */
/* Type definitions. */
/* Os unsigned int type define */
typedef unsigned long int uint32;
typedef unsigned short int uint16;
typedef unsigned char uint8;
typedef signed long int int32;
typedef signed short int int16;
typedef signed char int8;
/* Os bool type define */
typedef enum
{
OS_BOOL_TURE,
OS_BOOL_FAIL
} eOsBool;
/* Os return value define */
typedef enum
{
OS_RET_SUCCESS,
OS_RET_FAILED,
OS_RET_INVALID_ARG
} eOsReturn;
/* Machine move type */
typedef enum
{
E_MAC_MOVE_TYPE_FORWARD,
E_MAC_MOVE_TYPE_BACKWARD,
E_MAC_MOVE_TYPE_TURN_LEFT,
E_MAC_MOVE_TYPE_TURN_RIGHT,
E_MAC_MOVE_TYPE_ERROR,
} eMacMoveType;
typedef struct
{
uint32 distance;
double angle;
} tCoordinate;
typedef struct
{
tCoordinate coordinate;
eOsBool found;
} tMessage;
/* External function declarations. */
#define PRINTF(format, args...) printf(format, ##args)
/* Macro API definitions. */
/* Global variable declarations. */
#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */
#endif /* TYPE_DEF_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -