mirror of
https://github.com/rust-embedded/embedded-hal.git
synced 2026-03-19 13:43:55 +00:00
embedded-can: bump defmt to v1, rename feature from defmt-03 to defmt
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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 }
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user