aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/tmc2130.py
Commit message (Collapse)AuthorAgeFilesLines
...
* tmc2130: Rename driver_BLANK_TIME_SELECT to driver_TBLKevin O'Connor2019-03-081-1/+1
| | | | | | | Use the field names from the trinamic specification. This makes the field similar to all the other driver_XXX config options. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Change respond_info() to log by defaultKevin O'Connor2019-03-041-6/+2
| | | | | | | It makes sense to log most respond_info() content, so do that by default. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2130: Wrap code to 80 columnsKevin O'Connor2019-03-011-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2130: Add support for INIT_TMC commandKevin O'Connor2019-03-011-4/+15
| | | | | Signed-off-by: Frank Kang <amblidex@outlook.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2130: Report write-only registers in DUMP_TMCKevin O'Connor2019-02-271-0/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2130: Use FieldHelper() to set/get driver fieldsKevin O'Connor2019-02-211-40/+102
| | | | | | | 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-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2130: Share config reading helpers with tmc2208.py codeKevin O'Connor2019-02-031-37/+51
| | | | | | | | 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: move local set_field/get_field helpers to FieldHelper classKevin O'Connor2019-02-031-7/+29
| | | | | | | 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: Use field definitions during driver initKevin O'Connor2019-02-031-2/+7
| | | | | | 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-6/+17
| | | | | 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-18/+20
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2208: Decode register fields in DUMP_TMC (#1156)lorf2019-02-021-1/+35
| | | | | | | | | | | 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>
* tmc2130: Use bus.py helper code for spiKevin O'Connor2018-11-211-29/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* 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>
* 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>
* tmc2130: Minor code cleanupKevin O'Connor2018-08-271-53/+58
| | | | | | | Rework the code to use set_register() with the string name of the desired register to set. Add a get_register() method. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pins: Explicitly pass can_invert and can_pullup to lookup_pin()Kevin O'Connor2018-07-261-6/+3
| | | | | | | | | | | | Don't pass pin_type to lookup_pin() - instead, if a pin can be inverted or can have a pullup, then the caller must explicitly specify that when calling lookup_pin(). This simplifies the code for the cases where it is not valid to invert or pullup. Explicitly pass the pin_type to setup_pin() and have ppins.setup_pin() apply default pullup and invert flags. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2130: Add a DUMP_TMC helper commandKevin O'Connor2018-06-301-3/+33
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2130: Allow the PWMCONF register to be configuredKevin O'Connor2018-05-251-0/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2130: Initial support for sensorless homingKevin O'Connor2018-05-251-5/+65
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2130: Use an SPI rate of 4MhzKevin O'Connor2018-05-251-1/+1
| | | | | | The spec recommends 4Mhz for SPI, so use that. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2130: Configure stealthchop velocity limitKevin O'Connor2018-05-251-4/+17
| | | | | | | Change stealhchop config option to a stealthchop_threshold configuration option. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2130: The default TOFF time should be 4Kevin O'Connor2018-05-241-1/+1
| | | | | | | The recommended TOFF time in "standalone mode" according to the tmc2130 is 4, so use that as the default. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2130: Add initial support for TMC2130 stepper motor driversKevin O'Connor2018-05-201-0/+70
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>