2018.07.26
Dependencies: QEI mbed-rtos mbed
Diff: common.h
- Revision:
- 2:c62dc496b79a
- Parent:
- 1:86705c6e0ab7
- Child:
- 3:85eb7e954bfa
--- a/common.h Mon Mar 28 00:09:56 2016 +0000 +++ b/common.h Thu Apr 14 10:27:21 2016 +0000 @@ -50,7 +50,25 @@ #define DEBUG_PRINT_L4(...) #endif -#define NumberOfI2CCommand 10 +#define NumberOfI2CCommand 14 + +/* For resolver reader controller */ +enum{ + I2C_CP_PREAMBLE_R, // Preamble of command packet + I2C_CP_COMMAND_R, // instruction command + I2C_CP_WDRAM_DIA_UPPER, // motor1 rotation direction + I2C_CP_WDRAM_DIA_LOWER, // motor1 rotation speed + I2C_CP_CCABLE_DIA_UPPER, // motor1 current limit detection threshold upper byte + I2C_CP_CCABLE_DIA_LOWER, // motor1 current limit detection threshold lower byte + I2C_CP_RESOLVER_RESO, // motor1 current limit detection threshold upper byte + I2C_CP_RES1, // reserved + I2C_CP_RES2, // reserved + I2C_CP_RES3, // reserved + I2C_CP_RES4, // reserved + I2C_CP_RES5, // reserved + I2C_CP_RES6, // reserved + I2C_CP_RES7, // reserved +}; #define ROTATE_PER_RESOLUTION 24 #define REAL_THREAD_DIAMETER 63 // 60+3