l3dmain.c

来自「phs 源代码 小灵通协议源代码 phs source code」· C语言 代码 · 共 55 行

C
55
字号
/************************************************************************/
/*									*/
/*		NAME		l3dmain.c	     			*/
/*		FUNC						         */
/*                                                                      */
/************************************************************************/
#ifndef PM_ONPC

#ifdef __cplusplus
extern "C"{
#endif

#include "phs_def.h"
#include "l3c_def.h"

#include "l3_ext.h"
#include "sysdef.h"

#ifdef SIMU_ON_PC
#include <string.h>
#endif

extern L3C_SYSWRK	l3c_syswork;
/************************************************************************/
/*                                                                      */
/*		NUMBER		13				        */
/*		CALL		U1 L3dMain()                           */
/*		PARAM						        */
/*		FUNC		handle unknown event                    */
/*		RETURN		0			               */
/*                                                                      */
/************************************************************************/
#ifdef _ON_SANYO_
U1 L3dMain(void)
#else
U1 L3dMain(void *mbox)
#endif
{
#ifndef _ON_SANYO_
	memcpy ((void *) l3c_syswork.in_evt, (const void *)(((EV_BUF_ST *)mbox)->event), sizeof (l3c_syswork.in_evt));
#endif
	if ( IN_DLDEVT->evt_cod == EDLDTDSP|| IN_DLDEVT->evt_cod == EDLUDTDSP ) /* event from L2 layer */
	{
		if ( IN_DLDEVT->msg_adr )
			m_frebuf((U1 *)IN_DLDEVT->msg_adr);	/* free memory*/
	}
	return (0);
}


#ifdef __cplusplus
}
#endif

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?