Skip to content

Commit 1bc48e8

Browse files
authored
Merge pull request #25 from braun-embedded/dir-value
Assign values to `Dir` variants
2 parents cb79b9d + 278ed35 commit 1bc48e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ pub enum Dir {
7979
///
8080
/// This corresponds to whatever direction the motor rotates in when the
8181
/// dir signal is set HIGH.
82-
Forward,
82+
Forward = 1,
8383

8484
/// Rotate the motor backward
8585
///
8686
/// This corresponds to whatever direction the motor rotates in when the
8787
/// dir signal set is LOW.
88-
Backward,
88+
Backward = -1,
8989
}

0 commit comments

Comments
 (0)