📄 testtskmenu.c
字号:
#define MENU_ROOT 0
#define MENU_RECORD 1
#define MENU_TEXT 2
#define MENU_SETUP 3
#define MENU_NETWORK 4
#define MENU_RECORD_NORCV 5
#define MENU_RECORD_EVER
typedef rom struct{
INT8U node_level;
INT8U node_num;
INT8U node_id;
INT8U node_sn;
INT8U fun_left;
INT8U fun_right;
}MENU_NODE;
MENU_NODE menu_node[32];
MENU_NODE *pMenu;
void MenuInit(void)
{
INT8U i,j;
menunode.node_level=0
void tskMenu(void * data){
void rom * pMsg; //The pointer of message, it has to be a pointer point to the "rom: region
INT8U err; //Used to return the error value. It must be a variable in data region
for(;;){ //The main loop
pMsg = OSQPend(peventXXXX, 0, &err); //Wait for the messages
if(err == OS_NO_ERR){
if((INT24U)pMsg >= PTR_MAX){ //If is a direct message--just a value
switch ((INT24U)pMsg){
}
}
else{ //If it's a undirect message--a pointer
switch (((MSG_HEAD *)pMsg)->Msg_ID){
//Add message processing codes here. If some long data in message attachment has to be
//left to be processed later, you have to save the ((MSG_HEAD *)pMsg)->pMem and
//(MSG_HEAD *)pMsg)->pmemATT, codes like following shall be added
// (MSG_HEAD *)pMsg)->Attached = FALSE;
//so at the out point, the attached block will not be released
case MSG_XXXX:
break;
}
if(((MSG_HEAD *)pMsg)->Attached == TRUE){
OSMemPut(((MSG_HEAD *)pMsg)->pmemATT, ((MSG_HEAD *)pMsg)->pMem);
}
OSMemPut(((MSG_HEAD *)pMsg)->pmemME, pMsg);
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -