From 584f19dbe94ea1ad9585ce04c5f1d5b424ebaa09 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sat, 8 Dec 2018 12:04:11 +0000 Subject: Updated TRNG. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12465 110e8d01-0319-4d1e-a829-52ad28d1bb01 --- os/hal/ports/STM32/LLD/RNGv1/hal_trng_lld.h | 44 ++++++++--------------------- 1 file changed, 12 insertions(+), 32 deletions(-) (limited to 'os/hal/ports/STM32/LLD/RNGv1/hal_trng_lld.h') diff --git a/os/hal/ports/STM32/LLD/RNGv1/hal_trng_lld.h b/os/hal/ports/STM32/LLD/RNGv1/hal_trng_lld.h index 3f04adcde..c537b84fd 100644 --- a/os/hal/ports/STM32/LLD/RNGv1/hal_trng_lld.h +++ b/os/hal/ports/STM32/LLD/RNGv1/hal_trng_lld.h @@ -93,43 +93,23 @@ /* Driver data structures and types. */ /*===========================================================================*/ +/*===========================================================================*/ +/* Driver macros. */ +/*===========================================================================*/ + /** - * @brief Driver configuration structure. - * @note It could be empty on some architectures. + * @brief Low level fields of the TRNG configuration structure. */ -typedef struct { - /* End of the mandatory fields.*/ - /** - * @brief Dummy configuration, it is not needed. - */ - uint32_t dummy; -} TRNGConfig; +#define trng_lld_config_fields \ + /* Dummy configuration, it is not needed.*/ \ + uint32_t dummy /** - * @brief Structure representing a TRNG driver. + * @brief Low level fields of the TRNG driver structure. */ -struct TRNGDriver { - /** - * @brief Driver state. - */ - trngstate_t state; - /** - * @brief Current configuration data. - */ - const TRNGConfig *config; -#if defined(TRNG_DRIVER_EXT_FIELDS) - TRNG_DRIVER_EXT_FIELDS -#endif - /* End of the mandatory fields.*/ - /** - * @brief Pointer to the RNG registers block. - */ - RNG_TypeDef *rng; -}; - -/*===========================================================================*/ -/* Driver macros. */ -/*===========================================================================*/ +#define trng_lld_driver_fields \ + /* Pointer to the RNG registers block.*/ \ + RNG_TypeDef *rng /*===========================================================================*/ /* External declarations. */ -- cgit v1.2.3