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.USBDongle/Applications/Thread/Thread_SED_Coap_Multicast/STM32_WPAN/App/app_thread.c')
-rw-r--r--Projects/P-NUCLEO-WB55.USBDongle/Applications/Thread/Thread_SED_Coap_Multicast/STM32_WPAN/App/app_thread.c33
1 files changed, 10 insertions, 23 deletions
diff --git a/Projects/P-NUCLEO-WB55.USBDongle/Applications/Thread/Thread_SED_Coap_Multicast/STM32_WPAN/App/app_thread.c b/Projects/P-NUCLEO-WB55.USBDongle/Applications/Thread/Thread_SED_Coap_Multicast/STM32_WPAN/App/app_thread.c
index bd2ecb3f1..41cde4a36 100644
--- a/Projects/P-NUCLEO-WB55.USBDongle/Applications/Thread/Thread_SED_Coap_Multicast/STM32_WPAN/App/app_thread.c
+++ b/Projects/P-NUCLEO-WB55.USBDongle/Applications/Thread/Thread_SED_Coap_Multicast/STM32_WPAN/App/app_thread.c
@@ -67,13 +67,10 @@ static void RxCpltCallback(void);
#endif /* (CFG_USB_INTERFACE_ENABLE != 0) */
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 );
@@ -105,7 +102,7 @@ PLACE_IN_SECTION("MB_MEM2") ALIGN(4) static TL_CmdPacket_t ThreadOtCmdBuffer;
PLACE_IN_SECTION("MB_MEM2") ALIGN(4) static uint8_t ThreadNotifRspEvtBuffer[sizeof(TL_PacketHeader_t) + TL_EVT_HDR_SIZE + 255U];
PLACE_IN_SECTION("MB_MEM2") ALIGN(4) static TL_CmdPacket_t ThreadCliCmdBuffer;
-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};
@@ -264,18 +261,6 @@ static void APP_THREAD_SetThreadMode( void )
UTIL_SEQ_SetTask(TASK_SET_THREAD_MODE,CFG_SCH_PRIO_1);
}
-/**
- * @brief Dummy request handler
- * @param
- * @retval None
- */
-static void APP_THREAD_DummyReqHandler(void * p_context,
- otCoapHeader * pHeader,
- otMessage * pMessage,
- const otMessageInfo * pMessageInfo)
-{
-}
-
/*************************************************************
*
* LOCAL FUNCTIONS
@@ -414,14 +399,16 @@ static void APP_THREAD_SetSleepyEndDeviceMode(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
{