hal_rf_wait_for_crystal_oscillator.c
来自「zigbee子节点源代码」· C语言 代码 · 共 25 行
C
25 行
#include "include.h"
//-------------------------------------------------------------------------------------------------------
// void rfWaitForCrystalOscillator(void)
//
// DESCRIPTION:
// Waits for the crystal oscillator to become stable. The flag is polled via the SPI status byte.
//
// Note that this function will lock up if the SXOSCON command strobe has not been given before the
// function call. Also note that global interrupts will always be enabled when this function
// returns.
//-------------------------------------------------------------------------------------------------------
void halRfWaitForCrystalOscillator(void) {
BYTE spiStatusByte;
// Poll the SPI status byte until the crystal oscillator is stable
do {
DISABLE_GLOBAL_INT();
FASTSPI_UPD_STATUS(spiStatusByte);
ENABLE_GLOBAL_INT();
} while (!(spiStatusByte & (BM(CC2420_XOSC16M_STABLE))));//?
} // halRfWaitForCrystalOscillator
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?