- //-----------------------------------------------------------------------------
- // nRF2401RX_H.h
- //-----------------------------------------------------------------------------
- // Copyright 2007 Vson Technology, Inc.
- // http://www.usbmcu.com
- //
- // Program Description:
- //
- //
- //
- //
- //
- // MCU: C8051F347
- // Tool chain: Keil C51 7.50 / Keil EVAL C51
- // Silicon Laboratories IDE version 2.6
- // Command Line:
- // Project Name: TR1000
- //
- //
- // Release 1.0
- // -All changes by Brin
- // -24 JUL 2007
- //
- #ifndef __nRF2401RX_H__
- #define __nRF2401RX_H__ //在#ifndef 之后定义 对#ifndef 没有任何作用
- //-----------------------------------------------------------------------------
- // Function Prototypes
- //-----------------------------------------------------------------------------
- void nRF2401Configuration(void);
- void Channel1Write8bitData(unsigned char);
- void Channel2Write8bitData(unsigned char);
- void Channel3Write8bitData(unsigned char);
- void Channel4Write8bitData(unsigned char);
- bit nRF2401RxData(void);
- unsigned char Channel1Read8bitData(void);
- unsigned char Channel2Read8bitData(void);
- unsigned char Channel3Read8bitData(void);
- unsigned char Channel4Read8bitData(void);
- //-----------------------------------------------------------------------------
- // Global Constants
- //-----------------------------------------------------------------------------
- #define RF_CONFIG_DATA14 0x38 //56 bit Data Length
- #define RF_CONFIG_DATA13 0x38 //56 bit Data Length
- //address 2
- #define RF_CONFIG_DATA12 0x00 //Address2 MSB
- #define RF_CONFIG_DATA11 0x00
- #define RF_CONFIG_DATA10 0x00
- #define RF_CONFIG_DATA9 0xba
- #define RF_CONFIG_DATA8 0x23 //Address2 LSB
- //address 1
- #define RF_CONFIG_DATA7 0x00 //Address1 MSB
- #define RF_CONFIG_DATA6 0x00
- #define RF_CONFIG_DATA5 0x00
- #define RF_CONFIG_DATA4 0xba
- #define RF_CONFIG_DATA3 0x23 //Address1 LSB
- #define RF_CONFIG_DATA2 0x43 //16 bit address length
- #define RF_CONFIG_DATA1 0x4f //0x4b 12M crystal
- #define RF_CONFIG_DATA00 0x15 //bit7-1: channel bit0:Direction 1-receiver mode 0-transmit mode
- #define RF_CONFIG_DATA01 0x15 //bit7-1: channel bit0:Direction 1-receiver mode 0-transmit mode
- #define RF_CONFIG_DATA02 0x15 //bit7-1: channel bit0:Direction 1-receiver mode 0-transmit mode
- #define RF_CONFIG_DATA03 0x15 //bit7-1: channel bit0:Direction 1-receiver mode 0-transmit mode
- #define _RF_PADLOAD_TEST_
- #define COUNT_BASE 2
- #define RF_PADLOAD 7
- //--------------------------
- // Begin device details
- //--------------------------
- //--------------------------
- // End device details
- //--------------------------
- //********************************************************
- #define SOFTUART_PORT_OUT P6OUT
- #define SOFTUART_PORT_IN P6IN
- //********************************************************
- #define bitSOFTUARTRX (0x02)
- #define bitSOFTUARTTX (0x01)
- #endif
- //-----------------------------------------------------------------------------
- // End Of File
- //-----------------------------------------------------------------------------