diff options
Diffstat (limited to 'Projects/P-NUCLEO-WB55.USBDongle/Applications/Thread/Thread_FTD_Coap_Multicast/STM32_WPAN/App/app_thread.c')
-rw-r--r-- | Projects/P-NUCLEO-WB55.USBDongle/Applications/Thread/Thread_FTD_Coap_Multicast/STM32_WPAN/App/app_thread.c | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/Projects/P-NUCLEO-WB55.USBDongle/Applications/Thread/Thread_FTD_Coap_Multicast/STM32_WPAN/App/app_thread.c b/Projects/P-NUCLEO-WB55.USBDongle/Applications/Thread/Thread_FTD_Coap_Multicast/STM32_WPAN/App/app_thread.c index 70e92e1bb..4d64c5c80 100644 --- a/Projects/P-NUCLEO-WB55.USBDongle/Applications/Thread/Thread_FTD_Coap_Multicast/STM32_WPAN/App/app_thread.c +++ b/Projects/P-NUCLEO-WB55.USBDongle/Applications/Thread/Thread_FTD_Coap_Multicast/STM32_WPAN/App/app_thread.c @@ -63,13 +63,10 @@ static void RxCpltCallback(void); #endif /* (CFG_FULL_LOW_POWER == 0) */ #endif /* (CFG_USB_INTERFACE_ENABLE != 0) */ 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_SendCoapMsg(void); /* Private variables -----------------------------------------------*/ @@ -97,7 +94,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}; @@ -322,18 +319,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 * @retval None @@ -345,14 +330,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 { |