[−][src]Module step_dir::traits
Traits that can be implemented by Step/Dir drivers
Users are generally not expected to use these traits directly, except to
specify trait bounds, where necessary. Please check out Driver
, which
uses these traits to provide the public API.
There are two kinds of traits in this module:
- Those that provide a minimal and low-level interface over a specific capability (like controlling the microstepping mode).
- Those that provide an API for enabling these capabilities, taking the the resources that are required to do so.
When constructed, drivers usually do not provide access to any of their capabilities. This means users can specifically enable the capabilities they need, and do not have have to provide hardware resources (like output pins) for capabilities that they are not going to use.
This approach also provides a lot of flexibility for non-standard use cases, for example if not all driver capabilities are controlled by software.
Traits
EnableDirectionControl | Enable direction control for a driver |
EnableStepControl | Enable step control for a driver |
EnableStepModeControl | Enable microstepping mode control for a driver |
SetDirection | Implemented by drivers that support controlling the DIR signal |
SetStepMode | Implemented by drivers that support controlling the microstepping mode |
Step | Implemented by drivers that support controlling the STEP signal |