Skip to content

Commit

Permalink
Cleanup todos
Browse files Browse the repository at this point in the history
  • Loading branch information
Grazfather committed Jan 25, 2025
1 parent 8137489 commit 9617100
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/stepper/stepper.zig
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ pub const DRV8825 = struct {
}
};

// TODO: Make generic? enum for driver e.g. A4988, DRV8824
pub fn Stepper(comptime Driver: type) type {
comptime {
if (!@hasDecl(Driver, "required_method")) {
Expand Down Expand Up @@ -113,10 +112,7 @@ pub fn Stepper(comptime Driver: type) type {
dir_state: mdf.base.Digital_IO.State = .low,
motor_steps: u16 = 200,

// TODO: Error type?
pub fn init(opts: Stepper_Options) Self {
// TODO: Validate args, optional ms pins
// TODO: If any ms pin is set, all must be set
return Self{
.clock = opts.clock_device,
.ms1_pin = opts.ms1_pin,
Expand Down Expand Up @@ -363,7 +359,9 @@ pub fn Stepper(comptime Driver: type) type {
return .cruising;
}

// TODO: Is this even configurable?
// Configure what value to write to the enable pin to enable the
// driver. This is LOW when this pin is hooked up to EN(bar), but HIGH
// when hooked up to SLEEP(bar)
pub fn set_enable_active_state(self: *Self, state: mdf.base.Digital_IO.State) void {
self.enable_active_state = state;
}
Expand Down

0 comments on commit 9617100

Please sign in to comment.