Update doc

This commit is contained in:
Henrik Stickann
2022-05-10 02:11:40 +02:00
parent 460f4e3c25
commit e4f5e3cd2e
3 changed files with 49 additions and 6 deletions

View File

@@ -19,7 +19,7 @@
/**
* @defgroup stm32Clocks Clocks
* @ingroup stm32
* @brief STM32 clock queries.
* @brief STM32 Clock queries.
* @{
*/
@@ -36,11 +36,28 @@
#define STA_STM32_GET_PCLK_FREQ_FN(n) HAL_RCC_GetPCLK ## n ## Freq
// Internal helper for macro expansion
/**
* @brief Internal helper for macro expansion.
*
* @param n PCLK index
* @return Function returning PCLK frequency
*/
#define _STA_STM32_GET_PCLK_FREQ_FN(n) STA_STM32_GET_PCLK_FREQ_FN(n)
// Get instance to PCLK index map macro
/**
* @brief Map instance name to PCLK index.
*
* @param type Hardware type
* @param idx Instance index
* @return PCLK index
*/
#define _STA_STM32_PCLK_IDX_MAP(type, idx) STA_STM32_ ## type ## _ ## idx ## _PCLK_IDX
// Get HAL handle to PCLK index map macro
/**
* @brief Map instance handle to PCLK index.
*
* @param handle HAL handle
* @return PCLK index
*/
#define _STA_STM32_HANDLE_PCLK_IDX_MAP(handle) STA_STM32_ ## handle ## _PCLK_IDX