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 'Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE_Thread/Ble_Thread_Static/STM32_WPAN/App/app_thread.c')
-rw-r--r--Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE_Thread/Ble_Thread_Static/STM32_WPAN/App/app_thread.c36
1 files changed, 10 insertions, 26 deletions
diff --git a/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE_Thread/Ble_Thread_Static/STM32_WPAN/App/app_thread.c b/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE_Thread/Ble_Thread_Static/STM32_WPAN/App/app_thread.c
index 690d5d626..356289177 100644
--- a/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE_Thread/Ble_Thread_Static/STM32_WPAN/App/app_thread.c
+++ b/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE_Thread/Ble_Thread_Static/STM32_WPAN/App/app_thread.c
@@ -70,14 +70,10 @@ static void RxCpltCallback(void);
/* USER CODE BEGIN PFP */
static void APP_THREAD_SendCoapMsg(void);
static void APP_THREAD_SendCoapMulticastRequest(uint8_t command);
-static void APP_THREAD_DummyReqHandler(void * p_context,
- otCoapHeader * pHeader,
- otMessage * pMessage,
- const otMessageInfo * pMessageInfo);
-static void APP_THREAD_CoapRequestHandler(otCoapHeader * pHeader,
- otMessage * pMessage,
- const otMessageInfo * pMessageInfo);
-
+static void APP_THREAD_CoapRequestHandler(void * pContext,
+ otCoapHeader * pHeader,
+ otMessage * pMessage,
+ const otMessageInfo * pMessageInfo);
static void APP_THREAD_SetSleepyEndDeviceMode(void);
static void APP_THREAD_CoapTimingElapsed(void);
static void APP_THREAD_SetThreadMode(void);
@@ -108,7 +104,7 @@ PLACE_IN_SECTION("MB_MEM2") ALIGN(4) static uint8_t ThreadNotifRspEvtBuffer[size
PLACE_IN_SECTION("MB_MEM2") ALIGN(4) static TL_CmdPacket_t ThreadCliCmdBuffer;
/* USER CODE BEGIN PV */
-static otCoapResource OT_Ressource = {C_RESSOURCE, APP_THREAD_DummyReqHandler, (void*)APP_THREAD_CoapRequestHandler, NULL};
+static otCoapResource OT_Ressource = {C_RESSOURCE, APP_THREAD_CoapRequestHandler,"myCtx", NULL};
static otMessageInfo OT_MessageInfo = {0};
static uint8_t OT_Command = 0;
static otCoapHeader OT_Header = {0};
@@ -393,20 +389,6 @@ static void APP_THREAD_StateNotif(uint32_t NotifFlags, void *pContext)
}
}
-
-
-/**
- * @brief Dummy request handler
- * @param
- * @retval None
- */
-static void APP_THREAD_DummyReqHandler(void * p_context,
- otCoapHeader * pHeader,
- otMessage * pMessage,
- const otMessageInfo * pMessageInfo)
-{
-}
-
/**
* @brief Task associated to the push button.
* @param None
@@ -419,14 +401,16 @@ static void APP_THREAD_SendCoapMsg(void)
}
/**
* @brief Handler called when the server receives a COAP request.
+ * @param pContext : Context
* @param pHeader : Header
* @param pMessage : Message
* @param pMessageInfo : Message information
* @retval None
*/
-static void APP_THREAD_CoapRequestHandler(otCoapHeader * pHeader,
- otMessage * pMessage,
- const otMessageInfo * pMessageInfo)
+static void APP_THREAD_CoapRequestHandler(void * pContext,
+ otCoapHeader * pHeader,
+ otMessage * pMessage,
+ const otMessageInfo * pMessageInfo)
{
do
{