Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions embedded-can/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

- Added `core::error::Error` implementations for every custom `impl Error`
- Increased MSRV to 1.81 due to `core::error::Error`
- Bumped `defmt` to v1
- `defmt-03` feature is now named `defmt`

## [v0.4.1] - 2022-09-28

Expand Down
5 changes: 1 addition & 4 deletions embedded-can/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,4 @@ repository = "https://github.com/rust-embedded/embedded-hal"

[dependencies]
nb = "1"
defmt = { version = "0.3", optional = true }

[features]
defmt-03 = ["dep:defmt"]
defmt = { version = "1", optional = true }
6 changes: 3 additions & 3 deletions embedded-can/src/id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/// Standard 11-bit CAN Identifier (`0..=0x7FF`).
#[derive(Debug, Copy, Clone, Eq, PartialEq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "defmt-03", derive(defmt::Format))]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct StandardId(u16);

impl StandardId {
Expand Down Expand Up @@ -45,7 +45,7 @@ impl StandardId {

/// Extended 29-bit CAN Identifier (`0..=1FFF_FFFF`).
#[derive(Debug, Copy, Clone, Eq, PartialEq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "defmt-03", derive(defmt::Format))]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct ExtendedId(u32);

impl ExtendedId {
Expand Down Expand Up @@ -95,7 +95,7 @@ impl ExtendedId {

/// A CAN Identifier (standard or extended).
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
#[cfg_attr(feature = "defmt-03", derive(defmt::Format))]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Id {
/// Standard 11-bit Identifier (`0..=0x7FF`).
Standard(StandardId),
Expand Down
2 changes: 1 addition & 1 deletion embedded-can/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ impl Error for core::convert::Infallible {
/// free to define more specific or additional error types. However, by providing
/// a mapping to these common CAN errors, generic code can still react to them.
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[cfg_attr(feature = "defmt-03", derive(defmt::Format))]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[non_exhaustive]
pub enum ErrorKind {
/// The peripheral receive buffer was overrun.
Expand Down