📄 rfoverridedataformat.c
字号:
/*****************************************************************************
* *
* ********** *
* ************ *
* *** *** *
* *** +++ *** *
* *** + + *** *
* *** + CHIPCON CC1010 *
* *** + + *** HAL - RFOverrideDataFormat *
* *** +++ *** *
* *** *** *
* *********** *
* ********* *
* *
*****************************************************************************
* *
*****************************************************************************
* Author: ROH *
*****************************************************************************
* Revision history: *
* *
* $Log: RFOverrideDataFormat.c,v $
* Revision 1.1 2002/10/14 13:04:33 tos
* Initial version in CVS.
*
* *
****************************************************************************/
#include <chipcon/hal.h>
// Variables that are used to override baudrate and PA output power
extern byte xdata hal_dataformat_override,
hal_baudrate_override,
hal_pa_pow_override,
hal_modem0_original,
hal_pa_pow_original;
//----------------------------------------------------------------------------
// void halRFOverrideDataFormat(...)
//
// Description:
// Function used to override the dataformat specified by an RX/TX-pair.
// If this function is called before halRFSetRxTxOff(...) it uses
// the parameter passed to this function instead of whatever the
// RX/TX-pair defines. If it is passed during an RF-operation, i.e. after
// halRFSetRxTxOff(...) is called, the parameter passed is immediately
// updated in hardware.
//
// Arguments:
// byte dataFormat
// Options given below. To disable the override the function must be
// called with the parameter RF_NO_OVERRIDE.
//
// Return value:
// void
//----------------------------------------------------------------------------
void halRFOverrideDataFormat(byte dataFormat) {
if (hal_dataformat_override=dataFormat)
MODEM0=(MODEM0&0xE7)|(dataFormat&0x18);
else
MODEM0=(MODEM0&0xE7)|(hal_modem0_original&0x18);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -