summaryrefslogtreecommitdiff
path: root/embassy-stm32/src/subghz/packet_status.rs
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-stm32/src/subghz/packet_status.rs')
-rw-r--r--embassy-stm32/src/subghz/packet_status.rs36
1 files changed, 18 insertions, 18 deletions
diff --git a/embassy-stm32/src/subghz/packet_status.rs b/embassy-stm32/src/subghz/packet_status.rs
index a4e348d9..b3acd73c 100644
--- a/embassy-stm32/src/subghz/packet_status.rs
+++ b/embassy-stm32/src/subghz/packet_status.rs
@@ -5,7 +5,7 @@ use super::{Ratio, Status};
/// Returned by [`fsk_packet_status`].
///
/// [`fsk_packet_status`]: super::SubGhz::fsk_packet_status
-#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+#[derive(Clone, Copy, PartialEq, Eq)]
pub struct FskPacketStatus {
buf: [u8; 4],
}
@@ -22,7 +22,7 @@ impl FskPacketStatus {
/// # Example
///
/// ```
- /// use stm32wl_hal::subghz::{CmdStatus, FskPacketStatus, Status, StatusMode};
+ /// use stm32wlxx_hal::subghz::{CmdStatus, FskPacketStatus, Status, StatusMode};
///
/// let example_data_from_radio: [u8; 4] = [0x54, 0, 0, 0];
/// let pkt_status: FskPacketStatus = FskPacketStatus::from(example_data_from_radio);
@@ -34,32 +34,32 @@ impl FskPacketStatus {
Status::from_raw(self.buf[0])
}
- /// Returns `true` if a preabmle error occured.
+ /// Returns `true` if a preamble error occurred.
pub const fn preamble_err(&self) -> bool {
(self.buf[1] & (1 << 7)) != 0
}
- /// Returns `true` if a synchronization error occured.
+ /// Returns `true` if a synchronization error occurred.
pub const fn sync_err(&self) -> bool {
(self.buf[1] & (1 << 6)) != 0
}
- /// Returns `true` if an address error occured.
+ /// Returns `true` if an address error occurred.
pub const fn addr_err(&self) -> bool {
(self.buf[1] & (1 << 5)) != 0
}
- /// Returns `true` if an crc error occured.
+ /// Returns `true` if an CRC error occurred.
pub const fn crc_err(&self) -> bool {
(self.buf[1] & (1 << 4)) != 0
}
- /// Returns `true` if a length error occured.
+ /// Returns `true` if a length error occurred.
pub const fn length_err(&self) -> bool {
(self.buf[1] & (1 << 3)) != 0
}
- /// Returns `true` if an abort error occured.
+ /// Returns `true` if an abort error occurred.
pub const fn abort_err(&self) -> bool {
(self.buf[1] & (1 << 2)) != 0
}
@@ -74,7 +74,7 @@ impl FskPacketStatus {
(self.buf[1] & 1) != 0
}
- /// Returns `true` if any error occured.
+ /// Returns `true` if any error occurred.
pub const fn any_err(&self) -> bool {
(self.buf[1] & 0xFC) != 0
}
@@ -86,7 +86,7 @@ impl FskPacketStatus {
/// # Example
///
/// ```
- /// use stm32wl_hal::{subghz::FskPacketStatus, Ratio};
+ /// use stm32wlxx_hal::{subghz::FskPacketStatus, Ratio};
///
/// let example_data_from_radio: [u8; 4] = [0, 0, 80, 0];
/// let pkt_status: FskPacketStatus = FskPacketStatus::from(example_data_from_radio);
@@ -103,7 +103,7 @@ impl FskPacketStatus {
/// # Example
///
/// ```
- /// use stm32wl_hal::{subghz::FskPacketStatus, Ratio};
+ /// use stm32wlxx_hal::{subghz::FskPacketStatus, Ratio};
///
/// let example_data_from_radio: [u8; 4] = [0, 0, 0, 100];
/// let pkt_status: FskPacketStatus = FskPacketStatus::from(example_data_from_radio);
@@ -147,7 +147,7 @@ impl defmt::Format for FskPacketStatus {
}
}
-impl core::fmt::Display for FskPacketStatus {
+impl core::fmt::Debug for FskPacketStatus {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("FskPacketStatus")
.field("status", &self.status())
@@ -170,7 +170,7 @@ impl core::fmt::Display for FskPacketStatus {
/// Returned by [`lora_packet_status`].
///
/// [`lora_packet_status`]: super::SubGhz::lora_packet_status
-#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+#[derive(Clone, Copy, PartialEq, Eq)]
pub struct LoRaPacketStatus {
buf: [u8; 4],
}
@@ -187,7 +187,7 @@ impl LoRaPacketStatus {
/// # Example
///
/// ```
- /// use stm32wl_hal::subghz::{CmdStatus, LoRaPacketStatus, Status, StatusMode};
+ /// use stm32wlxx_hal::subghz::{CmdStatus, LoRaPacketStatus, Status, StatusMode};
///
/// let example_data_from_radio: [u8; 4] = [0x54, 0, 0, 0];
/// let pkt_status: LoRaPacketStatus = LoRaPacketStatus::from(example_data_from_radio);
@@ -206,7 +206,7 @@ impl LoRaPacketStatus {
/// # Example
///
/// ```
- /// use stm32wl_hal::{subghz::LoRaPacketStatus, Ratio};
+ /// use stm32wlxx_hal::{subghz::LoRaPacketStatus, Ratio};
///
/// let example_data_from_radio: [u8; 4] = [0, 80, 0, 0];
/// let pkt_status: LoRaPacketStatus = LoRaPacketStatus::from(example_data_from_radio);
@@ -223,7 +223,7 @@ impl LoRaPacketStatus {
/// # Example
///
/// ```
- /// use stm32wl_hal::{subghz::LoRaPacketStatus, Ratio};
+ /// use stm32wlxx_hal::{subghz::LoRaPacketStatus, Ratio};
///
/// let example_data_from_radio: [u8; 4] = [0, 0, 40, 0];
/// let pkt_status: LoRaPacketStatus = LoRaPacketStatus::from(example_data_from_radio);
@@ -240,7 +240,7 @@ impl LoRaPacketStatus {
/// # Example
///
/// ```
- /// use stm32wl_hal::{subghz::LoRaPacketStatus, Ratio};
+ /// use stm32wlxx_hal::{subghz::LoRaPacketStatus, Ratio};
///
/// let example_data_from_radio: [u8; 4] = [0, 0, 0, 80];
/// let pkt_status: LoRaPacketStatus = LoRaPacketStatus::from(example_data_from_radio);
@@ -270,7 +270,7 @@ impl defmt::Format for LoRaPacketStatus {
}
}
-impl core::fmt::Display for LoRaPacketStatus {
+impl core::fmt::Debug for LoRaPacketStatus {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("LoRaPacketStatus")
.field("status", &self.status())