test upload STMicroelectronics L6470
Diff: L6470.h
- Revision:
- 3:f0e29d94b863
- Parent:
- 1:bb4bb05904cb
--- a/L6470.h Tue Dec 25 02:46:32 2012 +0000 +++ b/L6470.h Wed Mar 05 06:22:03 2014 +0000 @@ -8,7 +8,44 @@ #define FORWARD 1 #define REVERSE 0 +// +//INI = ResetHex +//My specification for Initial value +#define INI_ABS_POS 0 //Current position +#define INI_EL_POS 0 //Electrical position +#define INI_MARK 0 //Mark position +#define INI_SPEED 0 //Current speed +#define INI_ACC 0x8A //Acceleration +#define INI_DEC 0x8A //Deceleration +#define INI_MAX_SPEED 0x20 //Maximum speed +#define INI_MIN_SPEED 0 //Minimum speed +#define INI_KVAL_HOLD 0xFF //Full step speed +#define INI_KVAL_RUN 0xFF // +#define INI_KVAL_ACC 0xFF // +#define INI_KVAL_DEC 0xFF // +#define INI_INT_SPD 0x408 // +#define INI_ST_SLP 0x19 // +#define INI_FN_SLP_ACC 0x29 // +#define INI_FN_SLP_DEC 0x29 // +#define INI_K_THERA 0x0 // +// ADC_OUT ReadOnly +#define INI_OCR_TH 0xF +#define INI_STALL_TH 0x7F +#define INI_FS_SPD 0x27 +#define INI_STEP_MODE 0x7 +#define INI_ARARM_FN 0xFF +#define INI_CONFIG 0x2E88 +// INI_STATUS ReadOnly + + + + + + + + // name (length<<8)+address +// #define ABS_POS ((22<<8)+0x01) //Current position #define EL_POS ((9<<8)+0x02) //Electrical position #define MARK ((22<<8)+0x03) //Mark position @@ -37,32 +74,6 @@ -//RH = ResetHex -#define RH_ABS_POS 0 //Current position -#define RH_EL_POS 0 //Electrical position -#define RH_MARK 0 //Mark position -#define RH_SPEED 0 //Current speed -#define RH_ACC 0x8A //Acceleration -#define RH_DEC 0x8A //Deceleration -#define RH_MAX_SPEED 0x20 //Maximum speed -#define RH_MIN_SPEED 0 //Minimum speed -#define RH_KVAL_HOLD 0xFF //Full step speed -#define RH_KVAL_RUN 0xFF // -#define RH_KVAL_ACC 0xFF // -#define RH_KVAL_DEC 0xFF // -#define RH_INT_SPD 0x408 // -#define RH_ST_SLP 0x19 // -#define RH_FN_SLP_ACC 0x29 // -#define RH_FN_SLP_DEC 0x29 // -#define RH_K_THERA 0x0 // -// ADC_OUT ReadOnly -#define RH_OCR_TH 0xF -#define RH_STALL_TH 0x7F -#define RH_FS_SPD 0x27 -#define RH_STEP_MODE 0x7 -#define RH_ARARM_FN 0xFF -#define RH_CONFIG 0x2E88 -// RH_STATUS ReadOnly