-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix PWM #86
Fix PWM #86
Conversation
Signed-off-by: Patrick José Pereira <[email protected]>
Signed-off-by: Patrick José Pereira <[email protected]>
4de574f
to
d5fa8c9
Compare
pin.set_direction(Direction::Low)?; | ||
pin.set_direction(Direction::High)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering what a low/high direction even means, here it is:
"direction" ... reads as either "in" or "out". This value may
normally be written. Writing as "out" defaults to
initializing the value as low. To ensure glitch free
operation, values "low" and "high" may be written to
configure the GPIO as an output with that initial value.
So here we are configuring the pin to be an output
with the initial state as high
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Patrick José Pereira <[email protected]>
530ab88
to
eb01016
Compare
Signed-off-by: Patrick José Pereira <[email protected]>
Signed-off-by: Patrick José Pereira <[email protected]>
3e37d60
to
d4f1f47
Compare
let mut imu = Icm20689Device::builder().build().unwrap(); | ||
let mut imu = Icm20689Device::builder() | ||
.build() | ||
.expect("Failed to build ICM20689: {error:?}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, this should be fixed to "Failed to build ICM20689"
, as this is not a formatted string, same for the others. The error message is automatically shown by the underlying unwrap mechanism.
No description provided.