embedded-can: bump defmt to v1, rename feature from defmt-03 to defmt

This commit is contained in:
Robin Mueller
2025-10-01 16:44:24 +02:00
parent 21e547acd5
commit f9bfce551c
4 changed files with 7 additions and 8 deletions

View File

@@ -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

View File

@@ -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 }

View File

@@ -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 {
@@ -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 {
@@ -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),

View File

@@ -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.