stm32:rng: f4 rng peripheral is common with at least f2
Pull it up as common code immediately. Rename to v1, extract to common with a doxygen marker stubs, add to F2 makefiles.
This commit is contained in:
@@ -39,7 +39,7 @@ TGT_CFLAGS += $(DEBUG_FLAGS)
|
||||
ARFLAGS = rcs
|
||||
|
||||
OBJS = adc.o adc_common_v1.o can.o desig.o gpio.o pwr.o rcc.o \
|
||||
rtc.o crypto.o rng.o
|
||||
rtc.o crypto.o
|
||||
|
||||
OBJS += crc_common_all.o dac_common_all.o dma_common_f24.o \
|
||||
gpio_common_all.o gpio_common_f0234.o i2c_common_all.o \
|
||||
@@ -49,6 +49,7 @@ OBJS += crc_common_all.o dac_common_all.o dma_common_f24.o \
|
||||
usart_common_f124.o flash_common_f234.o flash_common_f24.o \
|
||||
hash_common_f24.o crypto_common_f24.o exti_common_all.o \
|
||||
rcc_common_all.o
|
||||
OBJS += rng_common_v1.o
|
||||
|
||||
OBJS += usb.o usb_standard.o usb_control.o usb_fx07_common.o \
|
||||
usb_f107.o usb_f207.o usb_msc.o
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
/* This file is used for documentation purposes. It does not need
|
||||
to be compiled. All source code is in the common area.
|
||||
If there is any device specific code required it can be included here,
|
||||
in which case this file must be added to the compile list. */
|
||||
|
||||
/** @defgroup rng_file RNG
|
||||
*
|
||||
* @ingroup STM32F4xx
|
||||
*
|
||||
* @brief <b>libopencm3 STM32F4xx RNG</b>
|
||||
*
|
||||
* @version 1.0.0
|
||||
*
|
||||
* @date 25 March 2015
|
||||
*
|
||||
* This library supports the random number generator peripheral (RNG) in the
|
||||
* STM32F4 series of ARM Cortex Microcontrollers by ST Microelectronics.
|
||||
*
|
||||
*LGPL License Terms @ref lgpl_license
|
||||
*/
|
||||
|
||||
@ingroup STM32F4xx
|
||||
|
||||
@brief <b>libopencm3 STM32F4xx RNG</b>
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file is part of the libopencm3 project.
|
||||
@@ -32,21 +29,3 @@
|
||||
*/
|
||||
|
||||
#include <libopencm3/stm32/rng.h>
|
||||
|
||||
/**@{*/
|
||||
|
||||
/** Disable the Random Number Generator peripheral.
|
||||
*/
|
||||
void rng_disable(void)
|
||||
{
|
||||
RNG_CR &= ~RNG_CR_RNGEN;
|
||||
}
|
||||
|
||||
/** Enable the Random Number Generator peripheral.
|
||||
*/
|
||||
void rng_enable(void)
|
||||
{
|
||||
RNG_CR |= RNG_CR_RNGEN;
|
||||
}
|
||||
|
||||
/**@}*/
|
||||
|
||||
Reference in New Issue
Block a user