summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <dirbaio@dirbaio.net>2022-08-29 14:55:38 +0200
committerDario Nieuwenhuis <dirbaio@dirbaio.net>2022-08-29 14:55:55 +0200
commitd18108b93888cb31b73b82cc823cb902c3e5413e (patch)
tree47d5957590946ad42a9bad8e7e7fb8c9777d3db3
parent5dabeac5d85d6ebf184b034054e827fca19a89ab (diff)
downloadnrf-softdevice-d18108b93888cb31b73b82cc823cb902c3e5413e.zip
peripheral: add derives to Advertisement enums.
-rw-r--r--nrf-softdevice/src/ble/peripheral.rs4
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],