Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Flipper-Zero/STM32CubeWB.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c')
-rw-r--r--Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c b/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c
index 5c663711d..7e8b55724 100644
--- a/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c
+++ b/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c
@@ -26,6 +26,12 @@
/* Private typedef -----------------------------------------------------------*/
+typedef enum
+{
+ SHCI_TL_CMD_RESP_RELEASE,
+ SHCI_TL_CMD_RESP_WAIT,
+} SHCI_TL_CmdRespStatus_t;
+
/* Private defines -----------------------------------------------------------*/
/**
* The default System HCI layer timeout is set to 33s
@@ -49,6 +55,8 @@ PLACE_IN_SECTION("SYSTEM_DRIVER_CONTEXT") SHCI_TL_UserEventFlowStatus_t SHCI_TL_
static tSHciContext shciContext;
static void (* StatusNotCallBackFunction) (SHCI_TL_CmdStatus_t status);
+static volatile SHCI_TL_CmdRespStatus_t CmdRspStatusFlag;
+
/* Private function prototypes -----------------------------------------------*/
static void Cmd_SetStatus(SHCI_TL_CmdStatus_t shcicmdstatus);
static void TlCmdEvtReceived(TL_EvtPacket_t *shcievt);
@@ -226,3 +234,24 @@ static void TlUserEvtReceived(TL_EvtPacket_t *shcievt)
return;
}
+/* Weak implementation ----------------------------------------------------------------*/
+__WEAK void shci_cmd_resp_wait(uint32_t timeout)
+{
+ (void)timeout;
+
+ CmdRspStatusFlag = SHCI_TL_CMD_RESP_WAIT;
+ while(CmdRspStatusFlag != SHCI_TL_CMD_RESP_RELEASE);
+
+ return;
+}
+
+__WEAK void shci_cmd_resp_release(uint32_t flag)
+{
+ (void)flag;
+
+ CmdRspStatusFlag = SHCI_TL_CMD_RESP_RELEASE;
+
+ return;
+}
+
+