?? hal.h
字號(hào):
/*
V0.1 Initial Release 10/July/2006 RBR
*/
#ifndef HAL_H
#define HAL_H
#include "compiler.h"
#include "lrwpan_config.h" //user configurations
#include "lrwpan_common_types.h" //types common acrosss most files
#include "evbConfig.h" //has Crystal frequency, other evboard specifics
#define PACKET_FOOTER_SIZE 2
#define SYMBOLS_PER_MAC_TICK() 1 //this controls timer0 prescale
//Timer Support
#define SYMBOLS_TO_MACTICKS(x) ((UINT32)x/(UINT32)SYMBOLS_PER_MAC_TICK())
#define MSECS_TO_MACTICKS(x) ((UINT32)x*((UINT32)LRWPAN_SYMBOLS_PER_SECOND/(UINT32)1000)*(UINT32)SYMBOLS_PER_MAC_TICK())
#define MACTIMER_MAX_VALUE 0x00FFFFFF //24 bit counter
UINT32 halMACTimerNowDelta(UINT32 x);
#define halMACTimerDelta(x,y) (((UINT32)x-((UINT32)y))& (UINT32)MACTIMER_MAX_VALUE)
#define SAVE_AND_DISABLE_GLOBAL_INTERRUPT(x) {x=GIEH;GIEH=0;}
#define RESTORE_GLOBAL_INTERRUPT(x) GIEH=x
#define DISABLE_GLOBAL_INTERRUPT() GIE=0
#define ENABLE_GLOBAL_INTERRUPT() GIE=1
#define halSetBaud(baud) SPBRG = (((FOSC/baud)/16) -1)
void halIdle (void);
#define HAL_SUSPEND(x)
UINT32 sym_to_ticks(UINT32 x);
UINT32 msecs_to_ticks(UINT32 x);
//software delay loop for x microseconds
#define halWaitUs(x) { unsigned char _dcnt; \ _dcnt = ((x* FOSC/1000000)/(12)); \ while(--_dcnt != 0) \ continue; }
void evbRadioIntCallback(void);
void halDisableRadio(void);
#endif
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -