Cleanup and refactoring of the STM32w port
This is a general cleanup of things like code style issues and code structure of the STM32w port to make it more like the rest of Contiki is structured.
This commit is contained in:
parent
12b3d02ba1
commit
a5046e83c7
118 changed files with 4470 additions and 4281 deletions
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* \addtogroup mb851-platform
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2010, STMicroelectronics.
|
||||
* All rights reserved.
|
||||
|
@ -27,17 +33,14 @@
|
|||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This file is part of the Contiki OS
|
||||
*
|
||||
*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* \file
|
||||
* Random number functions for STM32W.
|
||||
* \author
|
||||
* Salvatore Pitrulli <salvopitru@users.sourceforge.net>
|
||||
*/
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "dev/stm32w-radio.h"
|
||||
#include "lib/random.h"
|
||||
|
@ -46,18 +49,20 @@
|
|||
#warning "RANDOM_RAND_MAX is not defined as 65535."
|
||||
#endif
|
||||
|
||||
int rand(void)
|
||||
/*--------------------------------------------------------------------------*/
|
||||
int
|
||||
rand(void)
|
||||
{
|
||||
uint16_t rand_num;
|
||||
|
||||
ST_RadioGetRandomNumbers(&rand_num, 1);
|
||||
|
||||
return (int)rand_num;
|
||||
uint16_t rand_num;
|
||||
ST_RadioGetRandomNumbers(&rand_num, 1);
|
||||
return (int)rand_num;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
/*
|
||||
* It does nothing, since the rand already generates true random numbers.
|
||||
*/
|
||||
void srand(unsigned int seed)
|
||||
void
|
||||
srand(unsigned int seed)
|
||||
{
|
||||
}
|
||||
/** @} */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue