?? mft.h.bak
字號:
#ifndef MFTDEF
#define MFTDEF
/*
* Clock frequency value.
* This value is used to calculate Tick Counter value
*/
#define CLOCK_FREQ (8000000) // 8mHz
#define TICKS_PER_SECOND (1000) //8000us/tick
#define TICK_PRESCALE_VALUE (8)
#define aBaseSlotDuration (1) //tick=2000us
//MAC PIB attributes (Table 71 IEEE 802.15.4)
#define APP_DATA_LENGTH 16
//MAC constants (Table 70 IEEE 802.15.4)
#define TICK_4SECOND 4000
#define RAMSIZE 255
#define PAGESIZE 510
//#define MOUSEKEYSIZE 160
//#define JOYSTICKDATASIZE 90 //PAGESIZE-MOUSEKEYSIZE
//#define DATASIZE 14 //should change,head 4+data 10(5*2)(5 key*(1mode+1data))
#define DATA_HEAD 4
//#define KEYDATASIZE (3)//FIVE KEY *12=60 BYTE.LESS THAN DATASIZE =64
#define KBDATAEND 0xFF //usb key map data end
//#define USBDATALENGTH 12 //usb receive valid data length
#define USBRELENTH 8 //usb receive data buffer length
//----------------------------------------------------------------
#pragma DATA_SEG MY_RAM
unsigned char Ram_Key[RAMSIZE];
// unsigned char JkRam_Key[JOYSTICKDATASIZE];
#pragma DATA_SEG DEFAULT
#define Ram_Buffer Ram_Key+DATA_HEAD;//
//---------------------------------------------------------------
// Uncomment one of the below to describe this node's functionality.
// RFD's are not capable of being a coordinator or router, so do not
// uncomment them.
//-----------------------------------------------------------
#define I_AM_COORDINATOR
//#define I_AM_END_DEVICE
#if defined(I_AM_COORDINATOR)
#define I_AM_FFD
#else
#define I_AM_RFD
//#define I_AM_MICROPHONE //need GTS
#define I_AM_MICE //
//#define I_AM_JOYSTICK0 //
//#define I_AM_JOYSTICK1 //
//#define I_AM_KEYBOARD //
#endif
//------------------------------------------------------------
#define FIRSTCHAN 0
//check that a device type is chosen
#if !defined(I_AM_COORDINATOR)&& !defined(I_AM_END_DEVICE)
#error "device must be defined as a coordinator, router, or end device."
#endif
//check that exactly one functional level is selected
#if !defined(I_AM_FFD) && !defined (I_AM_RFD)
#error "device must be defined as either a RFD or FFD."
#endif
#if defined(I_AM_RFD) && defined(I_AM_FFD)
#error "device is define both as a RFD and as a FFD in Zigbee.def."
#endif
//check for illegal RFD device types
#if defined(I_AM_COORDINATOR) && defined(I_AM_RFD)
#error "A RFD can not be a coordinator."
#endif
// Uncomment one of the below to specifiy frequency band of operation.
// You may instead define this parameter as a project wide build
// option macro.
//#define MY_FREQ_BAND_IS_868_MHZ
//#define MY_FREQ_BAND_IS_900_MHZ
#define MY_FREQ_BAND_IS_2400_MHZ
// Number of times a frame should be retried before declaring error
#define MAC_MAX_FRAME_RETRIES (4)
// Amount of time we should do active scan.
#define MAC_ACTIVE_SCAN_PERIOD (34)
#define MAC_RESPONSE_WAIT_TIME 20
#define TICKS_Half_SECOND (500)
#define MAC_ACK_WAIT_TIME (6)
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -