diff --git a/src/pca9685.rs b/src/pca9685.rs index 9b380ca55..f80845ad1 100644 --- a/src/pca9685.rs +++ b/src/pca9685.rs @@ -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,