aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/tmc2208.py
Commit message (Collapse)AuthorAgeFilesLines
* tmc2130: Use FieldHelper() to set/get driver fieldsKevin O'Connor2019-02-211-17/+4
| | | | | | | Use the field helper to simplify the bit manipulation in the driver. This also enables the extended DUMP_TMC output. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* manual_stepper: Add an "extras" module for manually controlling a stepperKevin O'Connor2019-02-121-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2130: Share config reading helpers with tmc2208.py codeKevin O'Connor2019-02-031-39/+6
| | | | | | | | Add helper function for reading current, microsteps, and stealthchop settings from the config file. Use these helpers in both the tmc2130 and tmc2208 modules. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2208: Rename self.field_helper to self.fieldsKevin O'Connor2019-02-031-17/+16
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2208: move local set_field/get_field helpers to FieldHelper classKevin O'Connor2019-02-031-52/+32
| | | | | | | Move these helper functions to the FieldHelper class so that they can be used by other Trinamic drivers. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2208: Add helper for setting fields from the config fileKevin O'Connor2019-02-031-45/+42
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2208: Use field definitions during driver initKevin O'Connor2019-02-031-24/+43
| | | | | | Reduce the amount of bit manipulations by using the FieldHelper class. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2208: Add register field formattersDmitry Frolov2019-02-031-1/+23
| | | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net> Signed-off-by: Dmitry Frolov <dmitry.frolov@gmail.com>
* tmc2130: Convert field helper into a classKevin O'Connor2019-02-031-3/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2208: Decode register fields in DUMP_TMC (#1156)lorf2019-02-021-1/+154
| | | | | | | | | | | Report values of TMC2208 register fields in DUMP_TMC command to help in tuning and diagnostics. This also adds functions to refer to register fields by name for TMC drivers and register mappings for TMC2208. Signed-off-by: Kevin O'Connor <kevin@koconnor.net> Signed-off-by: Dmitry Frolov <dmitry.frolov@gmail.com>
* tmc2208: Check for debugging mode before checking for a retransmitKevin O'Connor2019-01-101-0/+2
| | | | | | Allow the tmc2208 code to be run from regression test cases. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Convert printer_state("connect") to an event handlerKevin O'Connor2019-01-081-4/+5
| | | | | | | Convert all users of the printer_state("connect") handler to register a "klippy:connect" event handler instead. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2208: error raise fixed for rx/tx mcu checkPetri Honkala2018-12-271-1/+1
| | | | Signed-off-by: Petri Honkala <cruwaller@gmail.com>
* endstop_phase: Add support for detecting phase via TMC stepper driversKevin O'Connor2018-10-161-0/+4
| | | | | | | | The Trinamic stepper motor drivers are capable of reporting the stepper phase - add support for using that capability to the enddstop_phases module. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2208: Improve error handlingKevin O'Connor2018-09-301-2/+5
| | | | | | | | Configure the tmc2208 during the 'connect' phase so that a problem during configuration is properly raised as a config error. Catch errors during DUMP_TMC and raise them as g-code errors. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Rename add_config_object() to register_config_callback()Kevin O'Connor2018-09-031-1/+1
| | | | | | | | | Change the name of the config registration method and pass an explicit reference to the callback to the new method. This makes the relationship between mcu registration and build_config() more clear in the calling code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2208: Initial support for configuring TMC2208 driversKevin O'Connor2018-08-271-0/+234
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>