mac_api.h

来自「实现应用层直接向MAC层发送数据」· C头文件 代码 · 共 51 行

H
51
字号
/******************************************************************************
 * FILENAME:	mac_api.h
 * 
 * DESCRIPTION:	This file defines interfaces between APP and MAC layer.
 * 
 * Copyright (C) 2008 BUPT
 *
 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF BUPT. The copyright
 * notice above does not evidence any actual or intended publication of such
 * source code.
 *
 *******************************************************************************/

#ifndef _MAC_API_H
#define _MAC_API_H

//#include <stdint.h>
typedef char uint8_t;
typedef unsigned int uint32_t;//因在windows下无stdint.h文件,固屏蔽后重新定义uint8_t和uint32_t

/*
	function: Send APP message to MAC layer
	          RULE:
                   ----------------------------
                   ****************************
                   ----------------------------
	input:    uint8_t *msg              // message pointer to be sent
	          uint32_t msgLen           // message length to be sent
	output:   NONE
	return:   0    -- success 
              else -- error
*/
int SendMessageToMAC(uint8_t *msg, uint32_t msgLen);

/*
	function: Get message from MAC layer
	          RULE:
                   ----------------------------
                   ****************************
                   ----------------------------
	input:    uint8_t *msgBuffer        // buffer pointer to cache MAC message
	          uint32_t msgBufferLen     // max buffer length
	output:   uint8_t *msgBuffer        // message pointer catained message
	return:   0    -- no more message
              -1   -- buffer length is to small
              else -- actual message length of message length
*/
int GetMessageFromMAC(uint8_t *msgBuffer, uint32_t msgBufferLen);

#endif

⌨️ 快捷键说明

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