开发工具:
文件大小: 156kb
下载次数: 0
上传时间: 2011-04-12
详细说明: by chaofu.zhang //2010-06-01 #ifndef LT8900_H #define LT8900_H //=================================================== // LT8900 Parameter Definition //=================================================== #define SYNCWORD_0 0x34 #define SYNCWORD_1 0x56 #define SYNCWORD_2 0x78 #define SYNCWORD_3 0x9A #define SYNCWORD_4 0xBC #define SYNCWORD_5 0xDE #define SYNCWORD_6 0xF0 #define SYNCWORD_7 0x12 #define LT_XTAL_OSC_EN 1 //Enable crystal #define LT_RSSI_PDN 0 //RSSI operation #define LT_VCO_CAL_EN 1 //calibrate VCO for each RF op eration //Reg32 (0x20) #define LT_PREAMBLE_LEN 7 //preamble = 4byte #define LT_SYNCWORD_LEN 3 //syncword = 64bit #define LT_TRAILER_LEN 0 //trailer = 4bit #define LT_DATA_PACKET_TYPE 0 //data packet type = NRZ law #define LT_FEC_TYPE 0 // No FEC #define LT_BRCLK_SEL 0 // NO BRCLK clock output #define LT_R32H ((LT_PREAMBLE_LEN << 5) + (LT_SYNCWORD_LEN << 3) + LT_TRAILER_LEN) #define LT_R32L ((LT_DATA_PACKET_TYPE << 6) + (LT_FEC_TYPE << 4) + (LT_BRCLK_SEL << 1)) //Reg40 (0x28) #define LT_FIFO_EMPTY_THRESHOLD 4 #define LT_FIFO_FULL_THRESHOLD 4 #define LT_SYNCWORD_THRESHOLD 7 #define LT_R40H ((LT_FIFO_EMPTY_THRESHOLD << 3)+ (LT_FIFO_FULL_THRESHOLD >> 2)) #define LT_R40L ((LT_FIFO_FULL_THRESHOLD<<6) + LT_SYNCWORD_THRESHOLD) //Reg41 (0x29) #define LT_CRC_ON 1 //CRC on #define LT_SCRAMBLE_ON 1 //scrable off #define LT_PACK_LENGTH_EN 1 //first data byte is packet length #define LT_FW_TERM_TX 1 #define LT_AUTO_ACK 0 //auto ACK #define LT_PKT_FIFO_POL 0 //PKT_FLAG is active high #define LT_CRC_INIT_DATA 0x00 //CRC initial data const char code LT_CH_Table[10][8] = { (0,10,20,30,40,50,60,70), (1,11,21,31,41,51,61,71), (2,12,22,32,42,52,62,72), (3,13,23,33,43,53,63,73), (4,14,24,34,44,54,64,74), (5,15,25,35,45,55,65,75), (6,16,26,36,46,56,66,76), (7,17,27,37,47,57,67,77), (8,18,28,38,48,58,68,78), (9,19,29,39,49,59,69,79) }; sbit MISO = P1^0; //input sbit RESET_N = P1^1; //output sbit CLK = P1^2; //output sbit MOSI = P1^3; //output sbit SS = P1^4; //output sbit FIFO_FLAG = P0^6; //input sbit PKT_FLAG = P0^7; //input char LT_RFPower = 0x0F; //maximum power unsigned char LT_SCAN_RSSI_CN_NO = (31 << 2); unsigned char LT_RX_ACK_TIME = 100; //wait RX ACK pack for 100us unsigned char LT_SCAN_RSSI_CH = 0; // scan channle = 2042+x unsigned char LT_SCAN_RSSI_TIME = 100; //scan RSSI wait time 100us char bdata LT_REG35 = 0; sbit LT_POWER_DOWN = LT_REG35^7; sbit LT_SLEEP_MODE = LT_REG35^6; sbit LT_BRCLK_ON_SLEEP = LT_REG35^4; char bdata LT_REG48H = 0; sbit LT_CRC_ERROR = LT_REG48H^7; sbit LT_FEC23_ERROR = LT_REG48H^6; sbit LT_FRAMER_ST_5 = LT_REG48H^5; sbit LT_FRAMER_ST_4 = LT_REG48H^4; sbit LT_FRAMER_ST_3 = LT_REG48H^3; sbit LT_FRAMER_ST_2 = LT_REG48H^2; sbit LT_FRAMER_ST_1 = LT_REG48H^1; sbit LT_FRAMER_ST_0 = LT_REG48H^0; char bdata LT_REG48L = 0; sbit LT_SYNCWORD_RECV = LT_REG48L^7; sbit LT_PKT_FLAG = LT_REG48L^6; sbit LT_FIFO_FLAG = LT_REG48L^5; char W_FIFO = 0; char R_FIFO = 0; #endif ...展开收缩
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.