📄 sppreset.c
字号:
/*****************************************************************************
* *
* ********** *
* ************ *
* *** *** *
* *** +++ *** *
* *** + + *** *
* *** + CHIPCON CC1010 *
* *** + + *** CUL - spp *
* *** +++ *** *
* *** *** *
* *********** *
* ********* *
* *
*****************************************************************************
* *
*****************************************************************************
* Author: JOL *
*****************************************************************************
* Revision history: *
* *
* $Log: sppReset.c,v $
* Revision 1.1 2002/10/14 12:27:34 tos
* Initial version in CVS.
*
* *
****************************************************************************/
#include <chipcon/sppInternal.h>
//----------------------------------------------------------------------------
// void sppReset (void)
//
// Description:
// Stops a transmission or reception by
// - turning the transceiver off
// - entering IDLE mode (sppStatus())
//----------------------------------------------------------------------------
void sppReset (void) {
// Turn off interrupts
INT_ENABLE (INUM_RF, INT_OFF);
INT_ENABLE (INUM_TIMER3, INT_OFF);
SPP_DISABLE_TIMEOUT();
INT_ENABLE (INUM_TIMER3, INT_ON);
// Turn off RF
SPP_POWER_DOWN();
// Modify the packet status
if (sppIntData.mode & (SPP_TX_MODE | SPP_TXACK_MODE)) {
sppIntData.pTXI->status = SPP_TX_RESET;
} else if (sppIntData.mode & (SPP_RX_MODE | SPP_RXACK_MODE)) {
sppIntData.pRXI->status = SPP_RX_RESET;
}
// Return to idle mode
sppIntData.mode = SPP_IDLE_MODE;
} // sppReset
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -