os_random() & os_get_random()

PaulTsai111
Posts: 48
Joined: Wed May 04, 2016 7:32 pm

os_random() & os_get_random()

Postby PaulTsai111 » Mon Jun 06, 2016 9:54 am

Hi Espressif:

I have one application needs to use the random number and I found that Espressif provide two

api about os_random() and os_get_random(). Can you give me a brief example about how to use this

two api ?

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: os_random() & os_get_random()

Postby ESP_Faye » Wed Jun 08, 2016 2:21 pm

Hi,

For example

Code: Select all

uint32 temp[2] = {0};

int ret = os_get_random((unsigned char *)temp, 7);
os_printf("ret %d, value 0x%08x%08x\n\r", ret, temp[1], temp[0]);


Thanks for your report, we will add it in our documentation.

Who is online

Users browsing this forum: No registered users and 13 guests