Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef _ART_COMMAND_PROTOCOL_H_
00012 #define _ART_COMMAND_PROTOCOL_H_
00013
00019 #undef CLI_ECHO
00020
00021 #define COM_OFFSET 0
00022 #define LEN_OFFSET 0
00023 #define SEQ_OFFSET 1
00024 #define DATA_OFFSET 2
00025
00026 #define FLAG_ENABLE 1
00027 #define FLAG_DISABLE 0
00028
00029 enum {
00030 ACK_CMD=0,
00031 NAK_CMD,
00032 STATUS_CMD,
00033 GOTO_CMD,
00034 PID_KP_CMD,
00035 PID_KI_CMD,
00036 PID_KD_CMD,
00037 PID_LIMITS_CMD,
00038 DEBUG_STATUS_CMD,
00039 CLI_SET_CMD,
00040 SET_IDLE_CMD,
00041 GET_REV_CMD,
00042 INVALID_CMD,
00043 MAX_CMD=INVALID_CMD
00044 };
00045
00046 enum {
00047 NAK_BAD_CMD=0,
00048 NAK_BAD_LEN,
00049 NAK_BAD_CSUM,
00050 NAK_BAD_PARAM
00051 };
00052
00053 typedef struct status_data_st_ {
00054 u08 position;
00055 u16 rpms;
00056 union {
00057 struct {
00058 u08 general:1;
00059 u08 throttle:1;
00060 u08 rpms:1;
00061 u08 estop:1;
00062 u08 diag:4;
00063 }flags;
00064 u08 flag_byte;
00065 };
00066 u08 direction;
00067 s16 dstate;
00068 s16 istate;
00069 u16 pwm_count;
00070 } status_data_t;
00071
00072 typedef struct firmware_rev_st_ {
00073 u08 fw_rev[2];
00074 u08 fw_repos_status[1];
00075 u08 uc_lib_rev[2];
00076 u08 uc_lib_repos_status[1];
00077 u08 build_time[6];
00078 } firmware_rev_t;
00079
00080 #endif