Skip to content

Commit

Permalink
pca: Add more expect messsages
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick José Pereira <[email protected]>
  • Loading branch information
patrickelectric authored and joaoantoniocardoso committed Dec 10, 2024
1 parent ab216af commit d50a65f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pca9685.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@ impl Pca9685DeviceBuilder {
};

pwm.reset_internal_driver_state();
pwm.use_external_clock().unwrap();
pwm.enable().unwrap();
pwm.use_external_clock()
.expect("Failed to use external clock");
pwm.enable().expect("Failed to enable PWM controller");

Ok(Pca9685Device {
pwm,
Expand Down

0 comments on commit d50a65f

Please sign in to comment.