msg.h
来自「还是arm7操作源码」· C头文件 代码 · 共 68 行
H
68 行
/******************************************************************************
Copyright (c) 2006 by RockOS.
All rights reserved.
This software is supported by the Rock Software Workroom.
Any bugs please contact the author with e-mail or QQ:
E-mail : baobaoba520@yahoo.com.cn
QQ : 59681888
*******************************************************************************
File name : msg.h
Description : header file for message packet management.
:
:
Auther : sunxinqiu
History :
2006-3-15 first release.
******************************************************************************/
#ifndef __MSG_H__
#define __MSG_H__
#ifdef __cplusplus
extern "C" {
#endif
enum
{
MINI_MSG_PACK = 1,
COMMON_MSG_PACK = 2,
HUGE_MSG_PACK = 3
};
enum
{
OS_MSG_FREE = 0,
OS_MSG_ALLOCATED = 1,
OS_MSG_SENT = 2,
OS_MSG_RECEIVED = 3
};
/* for message packet. */
typedef struct
{
U16 state;
U16 times;
HTASK owner;
void * pBuffer;
}MSGCB;
STATUS msg_init(void);
HMSG msgAlloc(U16 type);
void * msgMap (HMSG hmsg);
STATUS msgFree (HMSG hmsg);
STATUS msgSend(HMSG hmsg, HTASK task, U32 timeout);
STATUS setmsgState(HMSG hmsg, U16 state);
void msgCheck(void);
void msgDump(HMSG hmsg);
#ifdef __cplusplus
}
#endif
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?