aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD/RNGv1/hal_trng_lld.h
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2018-12-08 12:04:11 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2018-12-08 12:04:11 +0000
commit584f19dbe94ea1ad9585ce04c5f1d5b424ebaa09 (patch)
tree1b4dd0db56ed8a52af8e405307060f176f50ed81 /os/hal/ports/STM32/LLD/RNGv1/hal_trng_lld.h
parent358fdba16d69bbb8ec872288e8fd00a5e59a2b18 (diff)
downloadChibiOS-584f19dbe94ea1ad9585ce04c5f1d5b424ebaa09.tar.gz
ChibiOS-584f19dbe94ea1ad9585ce04c5f1d5b424ebaa09.tar.bz2
ChibiOS-584f19dbe94ea1ad9585ce04c5f1d5b424ebaa09.zip
Updated TRNG.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12465 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'os/hal/ports/STM32/LLD/RNGv1/hal_trng_lld.h')
-rw-r--r--os/hal/ports/STM32/LLD/RNGv1/hal_trng_lld.h44
1 files changed, 12 insertions, 32 deletions
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. */