📄 simple_phy.h
字号:
/* Description : head for phy functions.
*
* $Author: 王琢玉
* $Date: 2007/02/23
* $Name: simple_phy.h
*/
#ifndef SIMPLE_PHY_H
#define SIMPLE_PHY_H
#ifdef SIMPLE_PHY_GLOBALS
#define SIMPLE_PHY_EXT
#else
#define SIMPLE_PHY_EXT extern
#endif
#include "include.h"
/********************************************
Typedefs
********************************************/
typedef union
{
UINT32 u32Val;
struct
{
UINT8 b3;
UINT8 b2;
UINT8 b1;
UINT8 b0;
} Byte;
UINT8 v[4];
} TICK;
/********************************************
Globals
********************************************/
SIMPLE_PHY_EXT UINT8 gu8RTxMode;
SIMPLE_PHY_EXT PARAMS params;
SIMPLE_PHY_EXT ZIGBEE_FLAGS Zigbee_Flags;
SIMPLE_PHY_EXT ZIGBEE_PIB Zigbee_PIB ;
SIMPLE_PHY_EXT UINT8 RxBuffer[RX_BUFFER_SIZE];
SIMPLE_PHY_EXT UINT8 TxBuffer[TX_BUFFER_SIZE];
#define pTxData &TxBuffer[12];
SIMPLE_PHY_EXT volatile UINT8 tickExtension;
/********************************************
Prototypes
********************************************/
/************************************************************
Function: void PHYInit(void)
Parameter:
Return:
Description: Init the PHY
************************************************************/
void PHYInit(void);
/************************************************************
Function: void PHYTasks(void)
Parameter:
Return:
Description: check if there is any PHY task.
************************************************************/
void PHYTasks(void);
/************************************************************
Function: BYTE PHYGet(void)
Parameter:
Return: Returns one buffered data byte that was received
by the transceiver.
Description: Get one buffered data byte
************************************************************/
UINT8 PHYGet(void);
/************************************************************
Function: UINT8 PDDataRequest(tTxPacket *psPacket)
Parameter: *psPacket packet pointer
Return: Status
Description: Request to Tx one packet
************************************************************/
UINT8 PDDataRequest(void);
/************************************************************
Function: UINT8 PLMEPAValueSet(UINT8 u8PAValue)
Parameter: u8PAValue Value of power
Return: Status
Description: Adjust the MC13192s Output power.
************************************************************/
UINT8 PLMEPAValueSet(UINT8 u8PAValue);
/************************************************************
Function: UINT8 PLMESetChannelRequest(UINT8 u8Channel)
Parameter: u8Channel Channel number
Return: Status
Description: Set the MC13192 operating channel.
************************************************************/
void PLMESetChannelRequest(UINT8 u8Channel);
/************************************************************
Function: void PLMESetTrxStateRequest(UINT8 u8ReqMode)
Parameter: u8ReqMode Operational mode
Return: Status
Description: Set the MC13192 transceive operation.
************************************************************/
void PLMESetTrxStateRequest(UINT8 u8ReqMode);
/************************************************************
Function: void PLMESetMC13192ClockRate(UINT8 u8Freq)
Parameter: u8Freq Frequency value
Return:
Description: Set MC13192 CLKo frequency.
************************************************************/
void PLMESetMC13192ClockRate(UINT8 u8Freq);
/************************************************************
Function: void InitSymbolTimer(void)
Parameter:
Return:
Description: Init the symboltick of zigbee
************************************************************/
void InitSymbolTick(void);
/************************************************************
Function: TICK TickGet(void)
Parameter:
Return: current TICK
Description: get current tick
************************************************************/
TICK TickGet(void);
/************************************************************
Function: TimeGetDiff(TICK,TICK)
Parameter:
Return:
Description:
************************************************************/
#define TimekGetDiff(a,b) (a.u32Val - b.u32Val)
#endif /* _SIMPLE_PHY_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -