Bayley Wang
/
flash_configuration
flash based config testing
Diff: config.h
- Revision:
- 3:82c00c8e2cb4
- Parent:
- 2:cfc39b0843ae
diff -r cfc39b0843ae -r 82c00c8e2cb4 config.h --- a/config.h Thu Mar 02 07:36:56 2017 +0000 +++ b/config.h Tue Mar 07 08:06:39 2017 +0000 @@ -64,6 +64,12 @@ #define _COLUMNS __int_reg[7] #define _W_STEP __float_reg[8] +/*---operating mode---*/ + +#define BREMS_mode __int_reg[8] +#define BREMS_src __int_reg[9] +#define BREMS_op __int_reg[10] + /*internal variables and macros*/ extern float __float_reg[]; @@ -73,7 +79,27 @@ #define FPRINT(a) pc->printf("%s: %f\n", #a, _##a) #define DPRINT(a) pc->printf("%s: %d\n", #a, _##a) -#define MODE_RUN 0 -#define MODE_CFG 1 +enum { + MODE_RUN, + MODE_CFG, + MODE_ZERO, + MODE_CHR, +}; + +enum { + OP_TORQUE, + OP_DRIVING, + OP_SPEED, + OP_POSITION, +}; + +enum { + CMD_SRC_RC, + CMD_SRC_ANALOG, + CMD_SRC_TERMINAL, + CMD_SRC_SERIAL, + CMD_SRC_CAN, + CMD_SRC_INTERNAL +}; #endif \ No newline at end of file