F407-support

This commit is contained in:
dario
2024-01-05 23:48:10 +01:00
parent 0aa0995c70
commit 901f1b6cef
4 changed files with 149 additions and 1 deletions

View File

@@ -41,7 +41,6 @@ namespace sta
*/
#define STA_STM32_GET_PCLK_FREQ_FN(n) HAL_RCC_GetPCLK ## n ## Freq
/**
* @brief Internal helper for macro expansion.
*
@@ -49,6 +48,7 @@ namespace sta
* @return Function returning PCLK frequency
*/
#define _STA_STM32_GET_PCLK_FREQ_FN(n) STA_STM32_GET_PCLK_FREQ_FN(n)
/**
* @brief Map instance name to PCLK index.
*
@@ -73,18 +73,21 @@ namespace sta
* @param n TIM index
*/
#define STA_STM32_GET_TIM_PCLK_FREQ_FN(n) _STA_STM32_GET_PCLK_FREQ_FN(_STA_STM32_PCLK_IDX_MAP(TIM, n))
/**
* @brief Get function returning frequency of PCLK used by SPI interface.
*
* @param n SPI interface index
*/
#define STA_STM32_GET_SPI_PCLK_FREQ_FN(n) _STA_STM32_GET_PCLK_FREQ_FN(_STA_STM32_PCLK_IDX_MAP(SPI, n))
/**
* @brief Get function returning frequency of PCLK used by I2C interface.
*
* @param n I2C interface index
*/
#define STA_STM32_GET_I2C_PCLK_FREQ_FN(n) _STA_STM32_GET_PCLK_FREQ_FN(_STA_STM32_PCLK_IDX_MAP(I2C, n))
/**
* @brief Get function returning frequency of PCLK used by USART interface.
*
@@ -92,6 +95,7 @@ namespace sta
*/
#define STA_STM32_GET_USART_PCLK_FREQ_FN(n) _STA_STM32_GET_PCLK_FREQ_FN(_STA_STM32_PCLK_IDX_MAP(USART, n))
/**
* @brief Get function returning frequency of PCLK used by HAL instance.
*