⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sppreset.c

📁 ti-Chipcon CC1010 1G以下Soc源码库。包括rf,powermodes,clockmodes,flashRW,interrupts,timer,pwm,uart...所有底层驱动源码
💻 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 + -