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:
@@ -25,8 +25,8 @@ specific memorymap.h header before including this header file.*/
|
||||
/** @cond */
|
||||
#ifdef LIBOPENCM3_RNG_H
|
||||
/** @endcond */
|
||||
#ifndef LIBOPENCM3_RNG_COMMON_F24_H
|
||||
#define LIBOPENCM3_RNG_COMMON_F24_H
|
||||
#ifndef LIBOPENCM3_RNG_V1_H
|
||||
#define LIBOPENCM3_RNG_V1_H
|
||||
|
||||
/**@{*/
|
||||
|
||||
@@ -80,7 +80,7 @@ END_DECLS
|
||||
#endif
|
||||
/** @cond */
|
||||
#else
|
||||
#warning "rng_common_f24.h should not be included explicitly, only via rng.h"
|
||||
#warning "rng_common_v1.h should not be included explicitly, only via rng.h"
|
||||
#endif
|
||||
/** @endcond */
|
||||
|
||||
@@ -18,6 +18,6 @@
|
||||
#ifndef LIBOPENCM3_RNG_H
|
||||
#define LIBOPENCM3_RNG_H
|
||||
|
||||
#include <libopencm3/stm32/common/rng_common_f24.h>
|
||||
#include <libopencm3/stm32/common/rng_common_v1.h>
|
||||
|
||||
#endif
|
||||
|
||||
@@ -18,6 +18,6 @@
|
||||
#ifndef LIBOPENCM3_RNG_H
|
||||
#define LIBOPENCM3_RNG_H
|
||||
|
||||
#include <libopencm3/stm32/common/rng_common_f24.h>
|
||||
#include <libopencm3/stm32/common/rng_common_v1.h>
|
||||
|
||||
#endif
|
||||
|
||||
@@ -20,7 +20,9 @@
|
||||
#include <libopencm3/cm3/common.h>
|
||||
#include <libopencm3/stm32/memorymap.h>
|
||||
|
||||
#if defined(STM32F4)
|
||||
#if defined(STM32F2)
|
||||
# include <libopencm3/stm32/f2/rng.h>
|
||||
#elif defined(STM32F4)
|
||||
# include <libopencm3/stm32/f4/rng.h>
|
||||
#else
|
||||
# error "stm32 family not defined."
|
||||
|
||||
Reference in New Issue
Block a user