⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mac_api.h

📁 实现应用层直接向MAC层发送数据
💻 H
字号:
/******************************************************************************
 * 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -