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.

IAR里是否有随机函数的,求大神指导下



刚接触zigbee不久,现在在程序里需要用到随机函数,不知道哪位大神可以指导下我,感激不尽。能够给一小段程序让我瞻仰瞻仰也是极好的,先行谢过,坐等大神出现。。。。。。。大神你在哪里?!!!

  • osal_rand( ) :返回一个16位的随机数

    /*********************************************************************
    * @fn osal_rand
    *
    * @brief Random number generator
    *
    * @param none
    *
    * @return uint16 - new random number
    */
    uint16 osal_rand( void )
    {
    return ( Onboard_rand() );
    }