![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
This is a SLIP interface for the STM32F446RE Nucleo Board. It is designed to work specifically with the esp-link software for the ESP8266. The program is an example of a rest command.
Diff: main.cpp
- Revision:
- 7:ff4efdc27514
- Parent:
- 6:faf57101b59c
- Child:
- 8:6a3b7c5d9ba7
--- a/main.cpp Wed Aug 10 20:55:29 2016 +0000 +++ b/main.cpp Tue Aug 16 16:04:33 2016 +0000 @@ -33,18 +33,18 @@ //generate some random numbers int random_number(int min_num, int max_num); int random_number(int min_num, int max_num){ - int result=0,low_num=0,hi_num=0; - if(min_num<max_num) - { - low_num=min_num; - hi_num=max_num+1; // this is done to include max_num in output. - }else{ - low_num=max_num+1;// this is done to include max_num in output. - hi_num=min_num; - } - srand(time(NULL)); - result = (rand()%(hi_num-low_num))+low_num; - return result; + int result=0,low_num=0,hi_num=0; + if(min_num<max_num) + { + low_num=min_num; + hi_num=max_num+1; // this is done to include max_num in output. + }else{ + low_num=max_num+1;// this is done to include max_num in output. + hi_num=min_num; + } + srand(time(NULL)); + result = (rand()%(hi_num-low_num))+low_num; + return result; } // Callback made from esp-link to notify of wifi status changes