- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using WICED SDK 3.7.0 and I want to creat some random number.I try
srand(time(NULL));
uint8_t value = rand()%255;
but I get error lib/thumb/v7em\libc.a(lib_a-gettimeofdayr.o): In function `_gettimeofday_r':
c:\pf8_3\Wiced-Tool-Source\ARM_GNU\newlib-build\arm-none-eabi\thumb\v7em\newlib\libc\reent/../../../../../../../newlib-2.0.0/newlib/libc/reent/gettimeofdayr.c:71: undefined reference to `_gettimeofday'
tools/makefiles/wiced_elf.mk:240: recipe for target 'build/' failed
If I block the srand(time(NULL)); the target can be made without error but the value is the same .Can somebody tell me how to creat random value?THS!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
wiced_result_t wiced_crypto_get_random( void* buffer, uint16_t buffer_length )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
wiced_result_t wiced_crypto_get_random( void* buffer, uint16_t buffer_length )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For any API related queries I request you to go through the following API.html file which is provided with the SDK. It is in doc folder in the installation path. For Example
>> file:///C:/Users/rash/Documents/WICED/WICED-SDK-3.7.0/WICED-SDK/doc/API/wiced__crypto_8h.html#a3b75a8417089c7fa904422874c25c255
Please check wiced_crypto.h file in include folder of the SDK.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks a lot!