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

📄 halstack.h

📁 本程序是基于Zigbee协议的无线温度传感器网络系统
💻 H
字号:
/*
 * HALSTACK

 *
 */

/*
*2006/08/16 WXL 2.0

*/



//HAL functions need by Stack



#ifndef HALSTACK_H
#define HALSTACK_H

//these are prototypes for HAL functions called from the stack
//if a HAL function is not in here, then it is in the
//hal.h file in the target subdirectory


void halInit(void);  //processor, board specific initializations

void halInitUart(void);  // do everything except baud rate setting.

char halGetch(void);  //get a character from serial port
BOOL halGetchRdy(void);  //is a character available from the serial port?
void halPutch(char c);  //write a character to serial port
void halRawPut(char c);  //write a byte to serial port, no character interpretation
void halInitMACTimer(void); //init timer used for Radio timeouts
UINT32 halGetMACTimer(void); //return timer value
#ifdef LRWPAN_COMPILER_NO_RECURSION
UINT32 halISRGetMACTimer(void); //return timer value
#else
#define halISRGetMACTimer() halGetMACTimer()
#endif


LRWPAN_STATUS_ENUM halInitRadio(PHY_FREQ_ENUM frequency, BYTE channel, RADIO_FLAGS radio_flags);
void halGetProcessorIEEEAddress(BYTE *buf);
void halSetRadioIEEEAddress(void );
LRWPAN_STATUS_ENUM halSetRadioIEEEFrequency(PHY_FREQ_ENUM frequency, BYTE channel);
void halSetRadioPANID(UINT16 panid);
void halSetRadioShortAddr(SADDR saddr);
LRWPAN_STATUS_ENUM halSendPacket(BYTE flen, BYTE *frm);
LRWPAN_STATUS_ENUM halSetChannel(BYTE channel);

UINT32 halMacTicksToUs(UINT32 x);




UINT8 halGetRandomByte(void);
void halSleep(UINT32 msecs);    //put processor to sleep
void halSuspend(UINT32 msecs);  //suspends process, intended for Win32, dummy on others
void halUtilMemCopy(BYTE *dst, BYTE *src, BYTE len);
void halWaitMs(UINT32 msecs);
void halShutdown(void);
void halWarmstart(void);


//call backs to PHY, MAC from HAL
void phyRxCallback(void);
void phyTxStartCallBack(void);
void phyTxEndCallBack(void);
void macRxCallback(BYTE *ptr, BYTE rssi);
void macTxCallback(void);

void evbIntCallback(void);  //Evaluation board slow timer interrupt callback
void usrIntCallback(void);   //general interrupt callback , when this is called depends on the HAL layer.
#ifdef LRWPAN_ENABLE_SLOW_TIMER
void usrSlowTimerInt(void); //user interrupt slow timer interrupt callback
#endif


#endif

⌨️ 快捷键说明

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