You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
2.5 KiB

/******************************************************************************
(C), 2018-2099, Radkil
******************************************************************************
: paint_robot_new.c
: 稿
: radkil
: 2026714
:
:
:
1. : 2026714
: radkil
:
******************************************************************************/
#include "BHBF.h"
#include "msg_center.h"
#include "Protobuf/PSource/bsp_PV.pb.h"
/*----------------------------------------------*
* *
*----------------------------------------------*/
/*----------------------------------------------*
* *
*----------------------------------------------*/
/*----------------------------------------------*
* *
*----------------------------------------------*/
/*----------------------------------------------*
* *
*----------------------------------------------*/
/*----------------------------------------------*
* *
*----------------------------------------------*/
static uint32_t g_uiCustomModuleID = 0;
/*----------------------------------------------*
* *
*----------------------------------------------*/
/*----------------------------------------------*
* *
*----------------------------------------------*/
static void Custom_ModuleHandler(const Msg_t *pstMsg)
{
if (NULL == pstMsg)
{
return;
}
switch (pstMsg->m_uiMsgID)
{
case CUSTOM_GET_PV:
{
//log_i("RBCORE_CMD_STOP_ALL");
break;
}
default:
break;
}
}
void Custom_Task(void *argument)
{
while(1)
{
MsgCenter_ProcessWait(g_uiCustomModuleID, 2);
}
}
void Custom_Init(void)
{
g_uiCustomModuleID = MsgCenter_Register(MODULE_NAME_CUSTOM, Custom_ModuleHandler);
const osThreadAttr_t Custom_attributes = {
.name = MODULE_NAME_CUSTOM,
.stack_size = 1024,
.priority = (osPriority_t) osPriorityRealtime,
};
(void)osThreadNew(Custom_Task, NULL, &Custom_attributes);
}