aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD/RNGv1/hal_trng_lld.h
diff options
context:
space:
mode:
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. */