From f7312bab64bd7ef15a2e1d2dce74c878e0eb59f1 Mon Sep 17 00:00:00 2001 From: mengese <155087388+raffitaff@users.noreply.github.com> Date: Sun, 22 Dec 2024 10:43:14 -0600 Subject: [PATCH] Fixed #define PWM_SCALE typos in various IC HWAbstraction filesWM_STATUS instead of PWM_SCALE at register 0x71 --- tmc/ic/TMC2208/TMC2208_HW_Abstraction.h | 2 +- tmc/ic/TMC2209/TMC2209_HW_Abstraction.h | 2 +- tmc/ic/TMC2224/TMC2224_HW_Abstraction.h | 2 +- tmc/ic/TMC2225/TMC2225_HW_Abstraction.h | 2 +- tmc/ic/TMC2226/TMC2226_HW_Abstraction.h | 2 +- tmc/ic/TMC2240/TMC2240_HW_Abstraction.h | 6 +++--- tmc/ic/TMC2300/TMC2300_HW_Abstraction.h | 8 ++++---- tmc/ic/TMC5130/TMC5130_HW_Abstraction.h | 2 +- tmc/ic/TMC5160/TMC5160_HW_Abstraction.h | 2 +- tmc/ic/TMC5240/TMC5240_HW_Abstraction.h | 6 +++--- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/tmc/ic/TMC2208/TMC2208_HW_Abstraction.h b/tmc/ic/TMC2208/TMC2208_HW_Abstraction.h index 5aacdc58..da2ace00 100644 --- a/tmc/ic/TMC2208/TMC2208_HW_Abstraction.h +++ b/tmc/ic/TMC2208/TMC2208_HW_Abstraction.h @@ -41,7 +41,7 @@ #define TMC2208_CHOPCONF 0x6C #define TMC2208_DRVSTATUS 0x6F #define TMC2208_PWMCONF 0x70 -#define TMC2208_PWMSCALE 0x71 +#define TMC2208_PWM_SCALE 0x71 #define TMC2208_PWM_AUTO 0x72 diff --git a/tmc/ic/TMC2209/TMC2209_HW_Abstraction.h b/tmc/ic/TMC2209/TMC2209_HW_Abstraction.h index 08e9723c..c8548e04 100644 --- a/tmc/ic/TMC2209/TMC2209_HW_Abstraction.h +++ b/tmc/ic/TMC2209/TMC2209_HW_Abstraction.h @@ -46,7 +46,7 @@ #define TMC2209_CHOPCONF 0x6C #define TMC2209_DRV_STATUS 0x6F #define TMC2209_PWMCONF 0x70 -#define TMC2209_PWMSCALE 0x71 +#define TMC2209_PWM_SCALE 0x71 #define TMC2209_PWM_AUTO 0x72 // Register fields in TMC2209 diff --git a/tmc/ic/TMC2224/TMC2224_HW_Abstraction.h b/tmc/ic/TMC2224/TMC2224_HW_Abstraction.h index cbcd42f7..10792ec0 100644 --- a/tmc/ic/TMC2224/TMC2224_HW_Abstraction.h +++ b/tmc/ic/TMC2224/TMC2224_HW_Abstraction.h @@ -43,7 +43,7 @@ #define TMC2224_CHOPCONF 0x6C #define TMC2224_DRVSTATUS 0x6F #define TMC2224_PWMCONF 0x70 -#define TMC2224_PWMSCALE 0x71 +#define TMC2224_PWM_SCALE 0x71 #define TMC2224_PWM_AUTO 0x72 // FIELDS diff --git a/tmc/ic/TMC2225/TMC2225_HW_Abstraction.h b/tmc/ic/TMC2225/TMC2225_HW_Abstraction.h index 41b7f715..9465ed16 100644 --- a/tmc/ic/TMC2225/TMC2225_HW_Abstraction.h +++ b/tmc/ic/TMC2225/TMC2225_HW_Abstraction.h @@ -43,7 +43,7 @@ #define TMC2225_CHOPCONF 0x6C #define TMC2225_DRVSTATUS 0x6F #define TMC2225_PWMCONF 0x70 -#define TMC2225_PWMSCALE 0x71 +#define TMC2225_PWM_SCALE 0x71 #define TMC2225_PWM_AUTO 0x72 diff --git a/tmc/ic/TMC2226/TMC2226_HW_Abstraction.h b/tmc/ic/TMC2226/TMC2226_HW_Abstraction.h index 489dc344..e3b048ad 100644 --- a/tmc/ic/TMC2226/TMC2226_HW_Abstraction.h +++ b/tmc/ic/TMC2226/TMC2226_HW_Abstraction.h @@ -50,7 +50,7 @@ #define TMC2226_DRVSTATUS 0x6F #define TMC2226_PWMCONF 0x70 -#define TMC2226_PWMSCALE 0x71 +#define TMC2226_PWM_SCALE 0x71 #define TMC2226_PWM_AUTO 0x72 // Register fields diff --git a/tmc/ic/TMC2240/TMC2240_HW_Abstraction.h b/tmc/ic/TMC2240/TMC2240_HW_Abstraction.h index 523fce08..e64922bb 100644 --- a/tmc/ic/TMC2240/TMC2240_HW_Abstraction.h +++ b/tmc/ic/TMC2240/TMC2240_HW_Abstraction.h @@ -114,7 +114,7 @@ #define TMC2240_DRVSTATUS 0x6F #define TMC2240_PWMCONF 0x70 -#define TMC2240_PWMSCALE 0x71 +#define TMC2240_PWM_SCALE 0x71 #define TMC2240_PWM_AUTO 0x72 #define TMC2240_SG4_THRS 0x74 #define TMC2240_SG4_RESULT 0x75 @@ -529,10 +529,10 @@ #define TMC2240_PWM_LIM_FIELD ((RegisterField) {TMC2240_PWM_LIM_MASK, TMC2240_PWM_LIM_SHIFT, TMC2240_PWMCONF, false}) #define TMC2240_PWM_SCALE_SUM_MASK 0x000003FF #define TMC2240_PWM_SCALE_SUM_SHIFT 0 -#define TMC2240_PWM_SCALE_SUM_FIELD ((RegisterField) {TMC2240_PWM_SCALE_SUM_MASK, TMC2240_PWM_SCALE_SUM_SHIFT, TMC2240_PWMSCALE, false}) +#define TMC2240_PWM_SCALE_SUM_FIELD ((RegisterField) {TMC2240_PWM_SCALE_SUM_MASK, TMC2240_PWM_SCALE_SUM_SHIFT, TMC2240_PWM_SCALE, false}) #define TMC2240_PWM_SCALE_AUTO_MASK 0x01FF0000 #define TMC2240_PWM_SCALE_AUTO_SHIFT 16 -#define TMC2240_PWM_SCALE_AUTO_FIELD ((RegisterField) {TMC2240_PWM_SCALE_AUTO_MASK, TMC2240_PWM_SCALE_AUTO_SHIFT, TMC2240_PWMSCALE, false}) +#define TMC2240_PWM_SCALE_AUTO_FIELD ((RegisterField) {TMC2240_PWM_SCALE_AUTO_MASK, TMC2240_PWM_SCALE_AUTO_SHIFT, TMC2240_PWM_SCALE, false}) #define TMC2240_PWM_OFS_AUTO_MASK 0x000000FF #define TMC2240_PWM_OFS_AUTO_SHIFT 0 #define TMC2240_PWM_OFS_AUTO_FIELD ((RegisterField) {TMC2240_PWM_OFS_AUTO_MASK, TMC2240_PWM_OFS_AUTO_SHIFT, TMC2240_PWM_AUTO, false}) diff --git a/tmc/ic/TMC2300/TMC2300_HW_Abstraction.h b/tmc/ic/TMC2300/TMC2300_HW_Abstraction.h index 1fca0882..03de5191 100644 --- a/tmc/ic/TMC2300/TMC2300_HW_Abstraction.h +++ b/tmc/ic/TMC2300/TMC2300_HW_Abstraction.h @@ -42,8 +42,8 @@ #define TMC2300_CHOPCONF 0x6C #define TMC2300_DRVSTATUS 0x6F #define TMC2300_PWMCONF 0x70 -#define TMC2300_PWMSCALE 0x71 -#define TMC2300_PWMAUTO 0x72 +#define TMC2300_PWM_SCALE 0x71 +#define TMC2300_PWMAUTO 0x72 // Register fields (manually add) @@ -261,10 +261,10 @@ #define TMC2300_PWM_LIM_FIELD ((RegisterField) {TMC2300_PWM_LIM_MASK, TMC2300_PWM_LIM_SHIFT, TMC2300_PWMCONF, false}) #define TMC2300_PWM_SCALE_SUM_MASK 0x000000FF #define TMC2300_PWM_SCALE_SUM_SHIFT 0 -#define TMC2300_PWM_SCALE_SUM_FIELD ((RegisterField) {TMC2300_PWM_SCALE_SUM_MASK, TMC2300_PWM_SCALE_SUM_SHIFT, TMC2300_PWMSCALE, false}) +#define TMC2300_PWM_SCALE_SUM_FIELD ((RegisterField) {TMC2300_PWM_SCALE_SUM_MASK, TMC2300_PWM_SCALE_SUM_SHIFT, TMC2300_PWM_SCALE, false}) #define TMC2300_PWM_SCALE_AUTO_MASK 0xFFFF0000 #define TMC2300_PWM_SCALE_AUTO_SHIFT 16 -#define TMC2300_PWM_SCALE_AUTO_FIELD ((RegisterField) {TMC2300_PWM_SCALE_AUTO_MASK, TMC2300_PWM_SCALE_AUTO_SHIFT, TMC2300_PWMSCALE, true}) +#define TMC2300_PWM_SCALE_AUTO_FIELD ((RegisterField) {TMC2300_PWM_SCALE_AUTO_MASK, TMC2300_PWM_SCALE_AUTO_SHIFT, TMC2300_PWM_SCALE, true}) #define TMC2300_PWM_OFS_AUTO_MASK 0x000000FF #define TMC2300_PWM_OFS_AUTO_SHIFT 0 #define TMC2300_PWM_OFS_AUTO_FIELD ((RegisterField) {TMC2300_PWM_OFS_AUTO_MASK, TMC2300_PWM_OFS_AUTO_SHIFT, TMC2300_PWMAUTO, false}) diff --git a/tmc/ic/TMC5130/TMC5130_HW_Abstraction.h b/tmc/ic/TMC5130/TMC5130_HW_Abstraction.h index 79dedaae..9ae77d6c 100644 --- a/tmc/ic/TMC5130/TMC5130_HW_Abstraction.h +++ b/tmc/ic/TMC5130/TMC5130_HW_Abstraction.h @@ -123,7 +123,7 @@ #define TMC5130_DCCTRL 0x6E #define TMC5130_DRVSTATUS 0x6F #define TMC5130_PWMCONF 0x70 -#define TMC5130_PWMSTATUS 0x71 +#define TMC5130_PWM_SCALE 0x71 #define TMC5130_ENCM_CTRL 0x72 #define TMC5130_LOST_STEPS 0x73 diff --git a/tmc/ic/TMC5160/TMC5160_HW_Abstraction.h b/tmc/ic/TMC5160/TMC5160_HW_Abstraction.h index 6ced9621..857c6645 100644 --- a/tmc/ic/TMC5160/TMC5160_HW_Abstraction.h +++ b/tmc/ic/TMC5160/TMC5160_HW_Abstraction.h @@ -132,7 +132,7 @@ #define TMC5160_DCCTRL 0x6E #define TMC5160_DRV_STATUS 0x6F #define TMC5160_PWMCONF 0x70 -#define TMC5160_PWMSCALE 0x71 +#define TMC5160_PWM_SCALE 0x71 #define TMC5160_PWM_AUTO 0x72 #define TMC5160_LOST_STEPS 0x73 diff --git a/tmc/ic/TMC5240/TMC5240_HW_Abstraction.h b/tmc/ic/TMC5240/TMC5240_HW_Abstraction.h index def6fb2e..b2aac307 100644 --- a/tmc/ic/TMC5240/TMC5240_HW_Abstraction.h +++ b/tmc/ic/TMC5240/TMC5240_HW_Abstraction.h @@ -135,7 +135,7 @@ #define TMC5240_DCCTRL 0x6E #define TMC5240_DRVSTATUS 0x6F #define TMC5240_PWMCONF 0x70 -#define TMC5240_PWMSCALE 0x71 +#define TMC5240_PWM_SCALE 0x71 #define TMC5240_PWM_AUTO 0x72 #define TMC5240_SG4_THRS 0x74 #define TMC5240_SG4_RESULT 0x75 @@ -772,10 +772,10 @@ #define TMC5240_PWM_LIM_FIELD ((RegisterField) { TMC5240_PWM_LIM_MASK, TMC5240_PWM_LIM_SHIFT, TMC5240_PWMCONF, false}) #define TMC5240_PWM_SCALE_SUM_MASK 0x3FF // PWM_SCALE // Bits: 9...0: [0...1023]PWM_SCALE_SUM: Actual PWM duty cycle. This value is used for scaling the values CUR_A and CUR_B read from the sine wave table. 1023: maximum duty cycle. This value is extended by two bits [1,0] for higher precision of duty cycle read out. Bits 9..2 correspond to the 8 bit values in other PWM duty cycle related registers. #define TMC5240_PWM_SCALE_SUM_SHIFT 0 // Bits: 9...0: [0...1023]PWM_SCALE_SUM: Actual PWM duty cycle. This value is used for scaling the values CUR_A and CUR_B read from the sine wave table. 1023: maximum duty cycle. This value is extended by two bits [1,0] for higher precision of duty cycle read out. Bits 9..2 correspond to the 8 bit values in other PWM duty cycle related registers. -#define TMC5240_PWM_SCALE_SUM_FIELD ((RegisterField) { TMC5240_PWM_SCALE_SUM_MASK, TMC5240_PWM_SCALE_SUM_SHIFT, TMC5240_PWMSCALE, false}) +#define TMC5240_PWM_SCALE_SUM_FIELD ((RegisterField) { TMC5240_PWM_SCALE_SUM_MASK, TMC5240_PWM_SCALE_SUM_SHIFT, TMC5240_PWM_SCALE, false}) #define TMC5240_PWM_SCALE_AUTO_MASK 0x1FF0000 // PWM_SCALE // PWM_SCALE_AUTO #define TMC5240_PWM_SCALE_AUTO_SHIFT 16 // PWM_SCALE_AUTO -#define TMC5240_PWM_SCALE_AUTO_FIELD ((RegisterField) { TMC5240_PWM_SCALE_AUTO_MASK, TMC5240_PWM_SCALE_AUTO_SHIFT, TMC5240_PWMSCALE, false}) +#define TMC5240_PWM_SCALE_AUTO_FIELD ((RegisterField) { TMC5240_PWM_SCALE_AUTO_MASK, TMC5240_PWM_SCALE_AUTO_SHIFT, TMC5240_PWM_SCALE, false}) #define TMC5240_PWM_OFS_AUTO_MASK 0xFF // PWM_AUTO // Automatically determined offset value #define TMC5240_PWM_OFS_AUTO_SHIFT 0 // Automatically determined offset value #define TMC5240_PWM_OFS_AUTO_FIELD ((RegisterField) { TMC5240_PWM_OFS_AUTO_MASK, TMC5240_PWM_OFS_AUTO_SHIFT, TMC5240_PWM_AUTO, false})