This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

请问cc2530可以用指定的信道通信么?

Other Parts Discussed in Thread: CC2530

请问cc2530可以用指定的信道通信么?默认情况下是自动选择,我想设定下可以么?

  • /***********************************************************************************

    * @fn      halRfSetChannel

    *

    * @brief   Set RF channel in the 2.4GHz band. The Channel must be in the range 11-26,

    *          11= 2005 MHz, channel spacing 5 MHz.

    *

    * @param   channel - logical channel number

    *

    * @return  none

    */

    void halRfSetChannel(uint8 channel)

    {

       FREQCTRL = (MIN_CHANNEL + (channel - MIN_CHANNEL) * CHANNEL_SPACING);

    }

  • // IEEE 802.15.4 defined constants (2.4 GHz logical channels)

    #define MIN_CHANNEL    11    // 2405 MHz

    #define MAX_CHANNEL                         26    // 2480 MHz

    #define CHANNEL_SPACING               5     // MHz