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/Thread/Thread_SED_Coap_FreeRTOS/STM32_WPAN/App/app_thread.c')
-rw-r--r--Projects/P-NUCLEO-WB55.Nucleo/Applications/Thread/Thread_SED_Coap_FreeRTOS/STM32_WPAN/App/app_thread.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/Projects/P-NUCLEO-WB55.Nucleo/Applications/Thread/Thread_SED_Coap_FreeRTOS/STM32_WPAN/App/app_thread.c b/Projects/P-NUCLEO-WB55.Nucleo/Applications/Thread/Thread_SED_Coap_FreeRTOS/STM32_WPAN/App/app_thread.c
index e784b26af..af84e0723 100644
--- a/Projects/P-NUCLEO-WB55.Nucleo/Applications/Thread/Thread_SED_Coap_FreeRTOS/STM32_WPAN/App/app_thread.c
+++ b/Projects/P-NUCLEO-WB55.Nucleo/Applications/Thread/Thread_SED_Coap_FreeRTOS/STM32_WPAN/App/app_thread.c
@@ -17,6 +17,7 @@
******************************************************************************
*/
/* USER CODE END Header */
+
/* Includes ------------------------------------------------------------------*/
#include "app_common.h"
#include "utilities_common.h"
@@ -141,11 +142,8 @@ static void APP_THREAD_FreeRTOSSendCLIToM0Task(void *argument);
/* 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,
+static void APP_THREAD_CoapRequestHandler(void * pContext,
+ otCoapHeader * pHeader,
otMessage * pMessage,
const otMessageInfo * pMessageInfo);
@@ -191,7 +189,7 @@ static osThreadId_t OsTaskCliId; /* Task used to manage CLI comamnd
#endif /* (CFG_FULL_LOW_POWER == 0) */
/* 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};
@@ -669,12 +667,14 @@ 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,
+static void APP_THREAD_CoapRequestHandler(void * pContext,
+ otCoapHeader * pHeader,
otMessage * pMessage,
const otMessageInfo * pMessageInfo)
{
@@ -791,17 +791,6 @@ static void APP_THREAD_SetThreadMode( void )
osThreadFlagsSet(OsTaskSetSedModeId,1);
}
-/**
- * @brief Dummy request handler
- * @param
- * @retval None
- */
-static void APP_THREAD_DummyReqHandler(void * p_context,
- otCoapHeader * pHeader,
- otMessage * pMessage,
- const otMessageInfo * pMessageInfo)
-{
-}
/* USER CODE END FD_LOCAL_FUNCTIONS */
/*************************************************************