📄 rfconfig.h
字号:
/******************************************************************************
* rfConfig.h
*
* Copyright 1994-2006 HolyStone Technology Co.,Ltd.
*
* DESCRIPTION:
*
* modification history
* --------------------
* 01a, 23mar2007, cuiqingwei written
* --------------------
******************************************************************************/
#ifndef _RFCONFIG_H
#define _RFCONFIG_H
//-----------------------------------------------------------------------------
// Define constants
//-----------------------------------------------------------------------------
/* FSCTRLL */
#define FREQ_2405MHZ 0x65
#define RADIO_SET_CHANNEL(x) st( FSCTRLL = FREQ_2405MHZ + 5 * ((x) - 11); )
#define RADIO_SET_TX_POWER(x) st( TXCTRLL = x; )
//-----------------------------------------------------------------------------
// EXTERN FUNCTIONS
//-----------------------------------------------------------------------------
/******************************************************************************
* @fn RfSetRadioFrequency
*
* @brief
* This function sets the radio frequency of the radio. The requency must
* be within the range of the radio.
*
* Parameters:
*
* @param word frequency
* The desired Radio Frequency in kHz.
*
* @return void
*
******************************************************************************/
extern void RfSetRadioFrequency(uint32 frequency);
/******************************************************************************
* @fn RfConfig
*
* @brief
* This function configures the radio for simple send and receive operation.
* Advanced IEEE 802.15.4 functionality such as Address Decoding, AutoAck
* etc is not employed. CRC value is automatically calculated to enable
* detection of packet corruption. The desired frequency is set. The
* function returns TRUE if the configuration is successful.
*
* Parameters:
*
* @param uint32 frequency
* The desired Radio Frequency in kHz.
*
* @return bool
* Returns TRUE if the configuration is successful and FALSE otherwise.
*
******************************************************************************/
extern bool RfConfig(uint32 frequency);
#endif /* _RFCONFIG_H */
/*------------------------------------------------------------------------------
0ooo
ooo0 ( )
( ) ) /
\ ( (_/
\_) By:cuiqingwei [gary]
------------------------------------------------------------------------------*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -