From fcdecd33908b649be52abd1c228f309b00b0b6b4 Mon Sep 17 00:00:00 2001 From: Robert Zieba Date: Wed, 15 Jan 2025 09:16:46 -0700 Subject: [PATCH] Update errors --- src/lib.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 8a20cb9..c72fe70 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -44,11 +44,18 @@ pub enum PdError { /// Set sink path rejected SetSinkPath, /// The requested action has not yet completed - InProgress, + Busy, + /// The requested action timed out + Timeout, + /// Generic failure + Failed, + /// The device is in the incorrect mode + InvalidMode, } -#[derive(Debug, Clone, Copy, PartialEq, Eq)] /// Top-level error type +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] pub enum Error { /// Bus error Bus(BE),