-
Notifications
You must be signed in to change notification settings - Fork 1
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
Minor fixup and adding a few missed functions #5
Minor fixup and adding a few missed functions #5
Conversation
The older version had a bug that could cause issues including this crate in other crates.
0ed4958
to
fd176c9
Compare
This constant is currently only used in testing and in the embassy FW update implementation. Mark it as `dead_code` to suppress warnings when building without this feature.
Change the FW update error type to directly accept its generic argument instead of indirectly using traits. This puts the trait restrictions on those types instead of on the traits.
fd176c9
to
be33eb2
Compare
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.
Doesn't compile when only log
feature is enabled:
❯ git status
On branch minor-changes
Your branch is up to date with 'origin/minor-changes'.
nothing to commit, working tree clean
❯ cargo build --no-default-features -F log
Compiling tps6699x v0.1.0 (D:\workspace\odp\tps6699x)
error[E0277]: `command::ReturnValue` doesn't implement `Display`
--> src\asynchronous\fw_update.rs:158:86
|
158 | info!("Controller {}: Failed to initialize FW update, result {}", i, r);
| ^ `command::ReturnValue` cannot be formatted with the default formatter
|
= help: the trait `Display` is not implemented for `command::ReturnValue`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
= note: this error originates in the macro `$crate::__private_api::format_args` which comes from the expansion of the macro `info` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: `command::TfuqBlockStatus` doesn't implement `Display`
--> src\asynchronous\fw_update.rs:194:87
|
194 | error!("Controller {}: Header block validation failed, result {}", i, r);
| ^ `command::TfuqBlockStatus` cannot be formatted with the default formatter
|
= help: the trait `Display` is not implemented for `command::TfuqBlockStatus`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
= note: this error originates in the macro `$crate::__private_api::format_args` which comes from the expansion of the macro `error` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: `command::TfuqBlockStatus` doesn't implement `Display`
--> src\asynchronous\fw_update.rs:295:80
|
295 | error!("Controller {}: Block validation failed, result {}", i, r);
| ^ `command::TfuqBlockStatus` cannot be formatted with the default formatter
|
= help: the trait `Display` is not implemented for `command::TfuqBlockStatus`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
= note: this error originates in the macro `$crate::__private_api::format_args` which comes from the expansion of the macro `error` (in Nightly builds, run with -Z macro-backtrace for more info)
For more information about this error, try `rustc --explain E0277`.
error: could not compile `tps6699x` (lib) due to 3 previous errors
These lines won't compile with the `log` feature, update formatting string to fix.
This register is actually 16 bytes and not 12 as indicated in documentation. Combine RDO value into single 32-bit value.
Currently needs OpenDevicePartnership/embedded-usb-pd#3 to build. |
Checks are failing due to permissions with |
5d23774
into
OpenDevicePartnership:main
Fixup a few minor things that didn't get caught in the initial implementation.