Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #define PWM_SCALE typos in various IC HWAbstraction files #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tmc/ic/TMC2208/TMC2208_HW_Abstraction.h
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion tmc/ic/TMC2209/TMC2209_HW_Abstraction.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tmc/ic/TMC2224/TMC2224_HW_Abstraction.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tmc/ic/TMC2225/TMC2225_HW_Abstraction.h
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion tmc/ic/TMC2226/TMC2226_HW_Abstraction.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions tmc/ic/TMC2240/TMC2240_HW_Abstraction.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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})
Expand Down
8 changes: 4 additions & 4 deletions tmc/ic/TMC2300/TMC2300_HW_Abstraction.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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})
Expand Down
2 changes: 1 addition & 1 deletion tmc/ic/TMC5130/TMC5130_HW_Abstraction.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tmc/ic/TMC5160/TMC5160_HW_Abstraction.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions tmc/ic/TMC5240/TMC5240_HW_Abstraction.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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})
Expand Down