From 6d7d617f40399c5ffaa588f9e5dfefd34164c531 Mon Sep 17 00:00:00 2001 From: xoviat Date: Sat, 17 Jun 2023 15:18:15 -0500 Subject: [PATCH] stm32/wpan: add ble acl_write --- embassy-stm32-wpan/src/ble.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/embassy-stm32-wpan/src/ble.rs b/embassy-stm32-wpan/src/ble.rs index 86a6331fb..a39198d06 100644 --- a/embassy-stm32-wpan/src/ble.rs +++ b/embassy-stm32-wpan/src/ble.rs @@ -42,5 +42,16 @@ impl Ble { .await; } - // TODO: acl commands + /// `TL_BLE_SendAclData` + pub async fn acl_write(handle: u16, payload: &[u8]) { + Ipcc::send(channels::cpu1::IPCC_HCI_ACL_DATA_CHANNEL, || unsafe { + CmdPacket::write_into( + HCI_ACL_DATA_BUFFER.as_mut_ptr() as *mut _, + TlPacketType::AclData, + handle, + payload, + ); + }) + .await; + } }