summaryrefslogtreecommitdiff
path: root/nrf-softdevice
diff options
context:
space:
mode:
authorBob McWhirter <bmcwhirt@redhat.com>2022-05-16 13:26:11 -0400
committerBob McWhirter <bmcwhirt@redhat.com>2022-05-16 13:26:11 -0400
commit18688ae733d2e204bb0c5a810751fda07b94d443 (patch)
tree356a99673fbf0988cc4d1483e9d4009aceb17f26 /nrf-softdevice
parent14eae6c04fcb9081532300cdc7b4d2904b329f0f (diff)
downloadnrf-softdevice-18688ae733d2e204bb0c5a810751fda07b94d443.zip
Add support for `write_without_response` on server characteristics.
Sets the appropriate flag in the Softdevice database.
Diffstat (limited to 'nrf-softdevice')
-rw-r--r--nrf-softdevice/src/ble/gatt_server.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/nrf-softdevice/src/ble/gatt_server.rs b/nrf-softdevice/src/ble/gatt_server.rs
index 6c7eb8c..398f88d 100644
--- a/nrf-softdevice/src/ble/gatt_server.rs
+++ b/nrf-softdevice/src/ble/gatt_server.rs
@@ -15,6 +15,7 @@ pub struct Characteristic {
pub uuid: Uuid,
pub can_read: bool,
pub can_write: bool,
+ pub can_write_without_response: bool,
pub can_notify: bool,
pub can_indicate: bool,
pub max_len: usize,
@@ -107,6 +108,9 @@ pub fn register_service<S: Service>(_sd: &Softdevice) -> Result<S, RegisterError
let mut char_md: raw::ble_gatts_char_md_t = unsafe { mem::zeroed() };
char_md.char_props.set_read(char.can_read as u8);
char_md.char_props.set_write(char.can_write as u8);
+ char_md
+ .char_props
+ .set_write_wo_resp(char.can_write_without_response as u8);
char_md.char_props.set_notify(char.can_notify as u8);
char_md.char_props.set_indicate(char.can_indicate as u8);
char_md.p_cccd_md = &mut cccd_attr_md;