Struct stm32wlxx_hal::subghz::BpskModParams
source · pub struct BpskModParams { /* private fields */ }
Expand description
BPSK modulation parameters.
Note: There is no method to set the pulse shape because there is only one valid pulse shape (Gaussian BT 0.5).
Implementations§
source§impl BpskModParams
impl BpskModParams
sourcepub const fn new() -> BpskModParams
pub const fn new() -> BpskModParams
Create a new BpskModParams
struct.
This is the same as default
, but in a const
function.
Example
use stm32wlxx_hal::subghz::BpskModParams;
const MOD_PARAMS: BpskModParams = BpskModParams::new();
assert_eq!(MOD_PARAMS, BpskModParams::default());
sourcepub const fn set_bitrate(self, bitrate: FskBitrate) -> BpskModParams
pub const fn set_bitrate(self, bitrate: FskBitrate) -> BpskModParams
Set the bitrate.
Example
Setting the bitrate to 600 bits per second.
use stm32wlxx_hal::subghz::{BpskModParams, FskBitrate};
const BITRATE: FskBitrate = FskBitrate::from_bps(600);
const MOD_PARAMS: BpskModParams = BpskModParams::new().set_bitrate(BITRATE);
sourcepub const fn as_slice(&self) -> &[u8]
pub const fn as_slice(&self) -> &[u8]
Extracts a slice containing the packet.
Example
use stm32wlxx_hal::subghz::{BpskModParams, FskBitrate};
const BITRATE: FskBitrate = FskBitrate::from_bps(100);
const MOD_PARAMS: BpskModParams = BpskModParams::new().set_bitrate(BITRATE);
assert_eq!(MOD_PARAMS.as_slice(), [0x8B, 0x9C, 0x40, 0x00, 0x16]);
Trait Implementations§
source§impl Clone for BpskModParams
impl Clone for BpskModParams
source§fn clone(&self) -> BpskModParams
fn clone(&self) -> BpskModParams
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for BpskModParams
impl Debug for BpskModParams
source§impl Default for BpskModParams
impl Default for BpskModParams
source§impl PartialEq for BpskModParams
impl PartialEq for BpskModParams
source§fn eq(&self, other: &BpskModParams) -> bool
fn eq(&self, other: &BpskModParams) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for BpskModParams
impl Eq for BpskModParams
impl StructuralEq for BpskModParams
impl StructuralPartialEq for BpskModParams
Auto Trait Implementations§
impl RefUnwindSafe for BpskModParams
impl Send for BpskModParams
impl Sync for BpskModParams
impl Unpin for BpskModParams
impl UnwindSafe for BpskModParams
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more