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

📄 zbphy.h

📁 IEEE802.15.4标准下的基于ZIGBEE协议栈的物理及链路层的代码
💻 H
字号:
#ifndef __ZBPHY_H__#define __ZBPHY_H__#include "ZBTYPES.h"typedef struct _phy_pib_t {	uint8_t currentChannel;     //range from 0-26		/**	 * 0-5bit indicate txPower of -32dBm-0dBm	 * 6-7bit indicate tolerance, 00=1DB;01=3DB;10=6DB 	 * currently do not support tolerance.	 **/	uint8_t transmitPower;		/*** is constant 32 bit bitmap ***/		uint32_t channelsSupported;		/** moved from macPib, shulde sync with cc2420 ***/	panid_t panId;		saddr_t shortAddress;		/*** moved from macPib, is constant read from cc2420 ***/		laddr_t longAddress;			/**	 * moved frome macPib for CSMA_CA use 	 * csmaBE initial value = macMinBE	 * csmaNB initial value = 0		 **/	uint8_t csmaBE;		uint8_t csmaNB;			/***	 * send frame parameter	 * psdu is send frame memory block pointer 	 * txLength is frame length loaded into cc2420, include length field exclude FCS	 **/	mem_head_t* psdu;			uint8_t txLength;				/*** receive frame memory block pointer ***/	mem_head_t* pRxBuf;				/*** indicate if cc2420 is ready to receive frame ***/	bool rxOn;		/*	1 indicate energy above threshold	2 indicate have detected IEEE802.15.4 characters	3 indicate energy above threshold AND have detected IEEE802.15.4 characters	*/	uint8_t CCAMode;	} phy_pib_t;/** * phy_error_t emun. **/enum {  PHY_BUSY			= 0,		//The CCA attempt has detected a busy channel.  PHY_BUSY_RX		= 1,		//The transceiver is asked to change its state while receiving.	  PHY_BUSY_TX		= 2,		//The transceiver is asked to change its state while transmitting.  PHY_FORCE_TRX_OFF	= 3,		//The transceiver is to be switched off.  PHY_IDLE			= 4,		//The CCA attempt has detected an idle channel.  //A SET/GET request was issued with a parameter in the primitive that is out of the valid range.  PHY_INVALID_PARAMETER	= 5,	  PHY_RX_ON			= 6,		//The transceiver is in or is to be configured into the receiver enabled state.  PHY_SUCCESS		= 7,		//A SET/GET, an ED operation, or a transceiver state change was successful.  PHY_TRX_OFF		= 8,		//The transceiver is in or is to be configured into the transceiver disabled state.  PHY_TX_ON			= 9,		//The transceiver is in or is to be configured into the transmitter enabled state.  //A SET/GET request was issued with the identifier of an attribute that is not supported.  PHY_UNSUPPORTED_ATTRIBUTE	= 10,};/** * | 76543210 | 7 | 6543210 | * |   RSSI   |CRC|   CORR  | * * RSSI(-60DB~40DB) = RSSI_VAL + RSSI_OFFSET(-45DB) * CORR(110~50)  * LQI = (CORR-a)*b * LQI(0~255) **/#endif

⌨️ 快捷键说明

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