diff options
author | alexmoon <alex.r.moon@gmail.com> | 2022-08-29 17:50:20 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-29 17:50:20 -0400 |
commit | 9dc3d2b10156ca64650e35226efc79de9f7ce5d7 (patch) | |
tree | 47d5957590946ad42a9bad8e7e7fb8c9777d3db3 | |
parent | 5dabeac5d85d6ebf184b034054e827fca19a89ab (diff) | |
parent | d18108b93888cb31b73b82cc823cb902c3e5413e (diff) | |
download | nrf-softdevice-master.zip |
Merge pull request #136 from embassy-rs/adv-derivemaster
peripheral: add derives to Advertisement enums.
-rw-r--r-- | nrf-softdevice/src/ble/peripheral.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nrf-softdevice/src/ble/peripheral.rs b/nrf-softdevice/src/ble/peripheral.rs index f5edc2a..65243f7 100644 --- a/nrf-softdevice/src/ble/peripheral.rs +++ b/nrf-softdevice/src/ble/peripheral.rs @@ -13,6 +13,8 @@ struct RawAdvertisement<'a> { } /// Connectable advertisement types, which can accept connections from interested Central devices. +#[derive(Clone, Copy, Debug)] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] pub enum ConnectableAdvertisement<'a> { ScannableUndirected { adv_data: &'a [u8], @@ -70,6 +72,8 @@ impl<'a> From<ConnectableAdvertisement<'a>> for RawAdvertisement<'a> { /// Non-Connectable advertisement types. They cannot accept connections, they can be /// only used to broadcast information in the air. +#[derive(Clone, Copy, Debug)] +#[cfg_attr(feature = "defmt", derive(defmt::Format))] pub enum NonconnectableAdvertisement<'a> { ScannableUndirected { adv_data: &'a [u8], |