contrib: Re-apply changes from initial import

These changes are from:

cb78150d86

The Doxygen comments have been removed to allow for easier importing in the
future.
This commit is contained in:
Amar Takhar
2025-08-01 08:43:29 +10:00
committed by Chris Johns
parent 3556b422f8
commit 001b368a50
57 changed files with 130 additions and 91 deletions
@@ -29,6 +29,13 @@
#include "stm32h7xx.h"
#include "Legacy/stm32_hal_legacy.h"
#include <stddef.h>
#ifdef __rtems__
/* this is to avoid definition of log function which conflicts with
* freebsd's systm.h log function. Whole theatre just to make sure
* we do have float_t available (defined in math.h) which is later
* used in HAL */
#define __math_68881 1
#endif /* __rtems__ */
#include <math.h>
/* Exported types ------------------------------------------------------------*/
@@ -439,7 +439,7 @@ extern "C" {
/* Exported types ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup ADC_LL_ES_INIT ADC Exported Init structure
* @{
*/
@@ -8359,7 +8359,7 @@ __STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_AWD3(ADC_TypeDef *ADCx)
* @}
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup ADC_LL_EF_Init Initialization and de-initialization functions
* @{
*/
@@ -71,7 +71,7 @@ static const uint8_t LL_BDMA_CH_OFFSET_TAB[] =
* @}
*/
/* Exported types ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup BDMA_LL_ES_INIT BDMA Exported Init structure
* @{
*/
@@ -258,7 +258,7 @@ typedef struct
#define LL_BDMA_CHANNEL_5 0x00000005U /*!< BDMA Channel 5 */
#define LL_BDMA_CHANNEL_6 0x00000006U /*!< BDMA Channel 6 */
#define LL_BDMA_CHANNEL_7 0x00000007U /*!< BDMA Channel 7 */
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
#define LL_BDMA_CHANNEL_ALL 0xFFFF0000U /*!< BDMA Channel all (used only for function @ref LL_BDMA_DeInit(). */
#endif /*USE_FULL_LL_DRIVER*/
/**
@@ -2451,7 +2451,7 @@ __STATIC_INLINE uint32_t LL_BDMA_IsEnabledIT_TE(BDMA_TypeDef *BDMAx, uint32_t Ch
* @}
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup BDMA_LL_EF_Init Initialization and de-initialization functions
* @{
*/
@@ -59,7 +59,7 @@ extern "C" {
* @}
*/
/* Exported types ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup COMP_LL_ES_INIT COMP Exported Init structure
* @{
*/
@@ -904,7 +904,7 @@ __STATIC_INLINE uint32_t LL_COMP_IsEnabledIT_OutputTrig(COMP_TypeDef *COMPx)
* @}
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup COMP_LL_EF_Init Initialization and de-initialization functions
* @{
*/
@@ -751,7 +751,7 @@ __STATIC_INLINE uint32_t LL_CORDIC_ReadData(const CORDIC_TypeDef *CORDICx)
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup CORDIC_LL_EF_Init Initialization and de-initialization functions
* @{
*/
@@ -428,7 +428,7 @@ __STATIC_INLINE void LL_CRC_Write_IDR(CRC_TypeDef *CRCx, uint32_t InData)
* @}
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup CRC_LL_EF_Init Initialization and de-initialization functions
* @{
*/
@@ -747,7 +747,7 @@ __STATIC_INLINE uint32_t LL_CRS_IsEnabledIT_ESYNC(void)
* @}
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup CRS_LL_EF_Init Initialization and de-initialization functions
* @{
*/
@@ -153,7 +153,7 @@ extern "C" {
/* Exported types ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup DAC_LL_ES_INIT DAC Exported Init structure
* @{
*/
@@ -1829,7 +1829,7 @@ __STATIC_INLINE uint32_t LL_DAC_IsEnabledIT_DMAUDR2(const DAC_TypeDef *DACx)
* @}
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup DAC_LL_EF_Init Initialization and de-initialization functions
* @{
*/
@@ -79,7 +79,7 @@ static const uint8_t LL_DMA_STR_OFFSET_TAB[] =
*/
/* Exported types ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup DMA_LL_ES_INIT DMA Exported Init structure
* @{
*/
@@ -3286,7 +3286,7 @@ __STATIC_INLINE uint32_t LL_DMA_IsEnabledIT_FE(DMA_TypeDef *DMAx, uint32_t Strea
* @}
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup DMA_LL_EF_Init Initialization and de-initialization functions
* @{
*/
@@ -41,7 +41,7 @@ extern "C" {
/* Private variables ---------------------------------------------------------*/
/* Private constants ---------------------------------------------------------*/
/* Private macros ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup DMA2D_LL_Private_Macros DMA2D Private Macros
* @{
*/
@@ -52,7 +52,7 @@ extern "C" {
#endif /*USE_FULL_LL_DRIVER*/
/* Exported types ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup DMA2D_LL_ES_Init_Struct DMA2D Exported Init structures
* @{
*/
@@ -2188,7 +2188,7 @@ __STATIC_INLINE uint32_t LL_DMA2D_IsEnabledIT_TE(DMA2D_TypeDef *DMA2Dx)
* @}
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup DMA2D_LL_EF_Init_Functions Initialization and De-initialization Functions
* @{
*/
@@ -41,7 +41,7 @@ extern "C" {
/* Private variables ---------------------------------------------------------*/
/* Private constants ---------------------------------------------------------*/
/* Private Macros ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup EXTI_LL_Private_Macros EXTI Private Macros
* @{
*/
@@ -50,7 +50,7 @@ extern "C" {
*/
#endif /*USE_FULL_LL_DRIVER*/
/* Exported types ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup EXTI_LL_ES_INIT EXTI Exported Init structure
* @{
*/
@@ -211,14 +211,14 @@ typedef struct
#define LL_EXTI_LINE_ALL (0xFFFFFFFFU) /*!< All Extended line */
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
#define LL_EXTI_LINE_NONE (0x00000000U) /*!< None Extended line */
#endif /*USE_FULL_LL_DRIVER*/
/**
* @}
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup EXTI_LL_EC_MODE Mode
* @{
@@ -3248,7 +3248,7 @@ __STATIC_INLINE uint32_t LL_D3_EXTI_GetPendClearSel_48_63(uint32_t ExtiLine)
* @}
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup EXTI_LL_EF_Init Initialization and de-initialization functions
* @{,
*/
@@ -1035,7 +1035,7 @@ __STATIC_INLINE void LL_FMAC_ConfigFunc(FMAC_TypeDef *FMACx, uint8_t Start, uint
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup FMAC_LL_EF_Init Initialization and de-initialization functions
* @{
*/
@@ -41,7 +41,7 @@ extern "C" {
/* Private variables ---------------------------------------------------------*/
/* Private constants ---------------------------------------------------------*/
/* Private macros ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup GPIO_LL_Private_Macros GPIO Private Macros
* @{
*/
@@ -52,7 +52,7 @@ extern "C" {
#endif /*USE_FULL_LL_DRIVER*/
/* Exported types ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup GPIO_LL_ES_INIT GPIO Exported Init structures
* @{
*/
@@ -949,7 +949,7 @@ __STATIC_INLINE void LL_GPIO_TogglePin(GPIO_TypeDef *GPIOx, uint32_t PinMask)
* @}
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup GPIO_LL_EF_Init Initialization and de-initialization functions
* @{
*/
@@ -10443,7 +10443,7 @@ __STATIC_INLINE uint32_t LL_HRTIM_IsEnabledDMAReq_DLYPRT(const HRTIM_TypeDef *HR
* @}
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup HRTIM_LL_LL_EF_Init In-initialization and de-initialization functions
* @{
*/
@@ -49,7 +49,7 @@ extern "C" {
*/
/* Private macros ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup I2C_LL_Private_Macros I2C Private Macros
* @{
*/
@@ -59,7 +59,7 @@ extern "C" {
#endif /*USE_FULL_LL_DRIVER*/
/* Exported types ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup I2C_LL_ES_INIT I2C Exported Init structure
* @{
*/
@@ -2243,7 +2243,7 @@ __STATIC_INLINE void LL_I2C_TransmitData8(I2C_TypeDef *I2Cx, uint8_t Data)
* @}
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup I2C_LL_EF_Init Initialization and de-initialization functions
* @{
*/
@@ -43,7 +43,7 @@ extern "C" {
/* Private constants ---------------------------------------------------------*/
/* Private macros ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup LPTIM_LL_Private_Macros LPTIM Private Macros
* @{
*/
@@ -53,7 +53,7 @@ extern "C" {
#endif /*USE_FULL_LL_DRIVER*/
/* Exported types ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup LPTIM_LL_ES_INIT LPTIM Exported Init structure
* @{
*/
@@ -352,7 +352,7 @@ typedef struct
@endcond
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup LPTIM_LL_EF_Init Initialisation and deinitialisation functions
* @{
*/
@@ -76,7 +76,7 @@ static const uint16_t LPUART_PRESCALER_TAB[] =
/* Private macros ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup LPUART_LL_Private_Macros LPUART Private Macros
* @{
*/
@@ -86,7 +86,7 @@ static const uint16_t LPUART_PRESCALER_TAB[] =
#endif /*USE_FULL_LL_DRIVER*/
/* Exported types ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup LPUART_LL_ES_INIT LPUART Exported Init structures
* @{
*/
@@ -2609,7 +2609,7 @@ __STATIC_INLINE void LL_LPUART_RequestRxDataFlush(USART_TypeDef *LPUARTx)
* @}
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup LPUART_LL_EF_Init Initialization and de-initialization functions
* @{
*/
@@ -78,7 +78,7 @@ static const uint32_t LL_MDMA_CH_OFFSET_TAB[] =
/* Private macros ------------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup MDMA_LL_ES_INIT MDMA Exported Init structure
* @{
*/
@@ -4319,7 +4319,7 @@ __STATIC_INLINE uint32_t LL_MDMA_IsEnabledIT_TC(MDMA_TypeDef *MDMAx, uint32_t Ch
* @}
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup MDMA_LL_EF_Init Initialization and de-initialization functions
* @{
*/
@@ -95,7 +95,7 @@ extern "C" {
/* Exported types ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup OPAMP_LL_ES_INIT OPAMP Exported Init structure
* @{
*/
@@ -787,7 +787,7 @@ __STATIC_INLINE uint32_t LL_OPAMP_IsEnabled(OPAMP_TypeDef *OPAMPx)
* @}
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup OPAMP_LL_EF_Init Initialization and de-initialization functions
* @{
*/
@@ -97,7 +97,7 @@ extern const uint8_t LL_RCC_PrescTable[16];
* @}
*/
/* Exported types ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup RCC_LL_Exported_Types RCC Exported Types
* @{
*/
@@ -1580,7 +1580,7 @@ typedef struct
* @}
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup RCC_LL_EC_PERIPH_FREQUENCY Peripheral clock frequency
* @{
*/
@@ -6327,7 +6327,7 @@ __STATIC_INLINE uint32_t LL_RCC_IsEnableIT_LSECSS(void)
* @}
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup RCC_LL_EF_Init De-initialization function
* @{
*/
@@ -52,7 +52,7 @@ extern "C" {
/* Private macros ------------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup RNG_LL_ES_Init_Struct RNG Exported Init structures
* @{
*/
@@ -676,7 +676,7 @@ __STATIC_INLINE uint32_t LL_RNG_GetHealthConfig(RNG_TypeDef *RNGx)
* @}
*/
#endif /* RNG_VER_3_2, RNG_VER_3_1 or RNG_VER_3_0 */
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup RNG_LL_EF_Init Initialization and de-initialization functions
* @{
*/
@@ -64,7 +64,7 @@ extern "C" {
*/
/* Private macros ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup RTC_LL_Private_Macros RTC Private Macros
* @{
*/
@@ -74,7 +74,7 @@ extern "C" {
#endif /*USE_FULL_LL_DRIVER*/
/* Exported types ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup RTC_LL_ES_INIT RTC Exported Init structure
* @{
*/
@@ -200,7 +200,7 @@ typedef struct
* @{
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup RTC_LL_EC_FORMAT FORMAT
* @{
*/
@@ -5168,7 +5168,7 @@ __STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ATAMP_SEEDF(void)
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup RTC_LL_EF_Init Initialization and de-initialization functions
* @{
*/
@@ -50,7 +50,7 @@ extern "C" {
*/
/* Exported types ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup SPI_LL_Exported_Types SPI Exported Types
* @{
*/
@@ -423,7 +423,7 @@ typedef struct
* @}
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup SPI_LL_EC_CRC_CALCULATION CRC Calculation
* @{
@@ -2592,7 +2592,7 @@ __STATIC_INLINE uint32_t LL_SPI_GetTxCRC(const SPI_TypeDef *SPIx)
* @}
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup SPI_LL_EF_Init Initialization and de-initialization functions
* @{
*/
@@ -2621,7 +2621,7 @@ void LL_SPI_StructInit(LL_SPI_InitTypeDef *SPI_InitStruct);
/* Private macros ------------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup I2S_LL_ES_INIT I2S Exported Init structure
* @{
*/
@@ -2774,7 +2774,7 @@ typedef struct
* @}
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup I2S_LL_EC_MCLK_OUTPUT MCLK Output
* @{
@@ -3745,7 +3745,7 @@ __STATIC_INLINE void LL_I2S_TransmitData32(SPI_TypeDef *SPIx, uint32_t TxData)
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup I2S_LL_EF_Init Initialization and de-initialization functions
* @{
*/
@@ -40,7 +40,7 @@ extern "C" {
/* Private variables ---------------------------------------------------------*/
/* Private constants ---------------------------------------------------------*/
/* Private macros ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup SWPMI_LL_Private_Macros SWPMI Private Macros
* @{
*/
@@ -50,7 +50,7 @@ extern "C" {
#endif /*USE_FULL_LL_DRIVER*/
/* Exported types ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup SWPMI_LL_ES_INIT SWPMI Exported Init structure
* @{
*/
@@ -1205,7 +1205,7 @@ __STATIC_INLINE void LL_SWPMI_DisableTXBypass(SWPMI_TypeDef *SWPMIx)
* @}
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup SWPMI_LL_EF_Init Initialization and de-initialization functions
* @{
*/
@@ -187,7 +187,7 @@ static const uint8_t SHIFT_TAB_OISx[] =
/* Exported types ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup TIM_LL_ES_INIT TIM Exported Init structure
* @{
*/
@@ -587,7 +587,7 @@ typedef struct
* @}
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup TIM_LL_EC_BREAK_ENABLE Break Enable
* @{
*/
@@ -726,7 +726,7 @@ typedef struct
* @}
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup TIM_LL_EC_OCSTATE Output Configuration State
* @{
*/
@@ -5169,7 +5169,7 @@ __STATIC_INLINE void LL_TIM_GenerateEvent_BRK2(TIM_TypeDef *TIMx)
* @}
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup TIM_LL_EF_Init Initialisation and deinitialisation functions
* @{
*/
@@ -71,7 +71,7 @@ static const uint32_t USART_PRESCALER_TAB[] =
* @}
*/
/* Private macros ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup USART_LL_Private_Macros USART Private Macros
* @{
*/
@@ -81,7 +81,7 @@ static const uint32_t USART_PRESCALER_TAB[] =
#endif /*USE_FULL_LL_DRIVER*/
/* Exported types ------------------------------------------------------------*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup USART_LL_ES_INIT USART Exported Init structures
* @{
*/
@@ -332,7 +332,7 @@ typedef struct
* @}
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup USART_LL_EC_CLOCK Clock Signal
* @{
*/
@@ -4364,7 +4364,7 @@ __STATIC_INLINE void LL_USART_RequestTxDataFlush(USART_TypeDef *USARTx)
* @}
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/** @defgroup USART_LL_EF_Init Initialization and de-initialization functions
* @{
*/
@@ -68,9 +68,11 @@
/** @defgroup HAL_Exported_Variables HAL Exported Variables
* @{
*/
#ifndef __rtems__
__IO uint32_t uwTick;
uint32_t uwTickPrio = (1UL << __NVIC_PRIO_BITS); /* Invalid PRIO */
HAL_TickFreqTypeDef uwTickFreq = HAL_TICK_FREQ_DEFAULT; /* 1KHz */
#endif /* __rtems__ */
/**
* @}
*/
@@ -166,11 +168,13 @@ uint32_t common_system_clock;
SystemCoreClock = common_system_clock;
#endif /* DUAL_CORE && CORE_CM4 */
#ifndef __rtems__
/* Use systick as time base source and configure 1ms tick (default clock after Reset is HSI) */
if(HAL_InitTick(TICK_INT_PRIORITY) != HAL_OK)
{
return HAL_ERROR;
}
#endif /* __rtems__ */
/* Init the low level hardware */
HAL_MspInit();
@@ -179,6 +183,7 @@ uint32_t common_system_clock;
return HAL_OK;
}
#ifndef __rtems__
/**
* @brief This function de-Initializes common part of the HAL and stops the systick.
* This function is optional.
@@ -220,7 +225,9 @@ HAL_StatusTypeDef HAL_DeInit(void)
/* Return function status */
return HAL_OK;
}
#endif /* __rtems__ */
#ifndef __rtems__
/**
* @brief Initializes the MSP.
* @retval None
@@ -287,6 +294,7 @@ __weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
/* Return function status */
return HAL_OK;
}
#endif /* __rtems__ */
/**
* @}
@@ -315,6 +323,7 @@ __weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
* @{
*/
#ifndef __rtems__
/**
* @brief This function is called to increment a global variable "uwTick"
* used as application time base.
@@ -449,6 +458,7 @@ __weak void HAL_ResumeTick(void)
/* Enable SysTick Interrupt */
SysTick->CTRL |= SysTick_CTRL_TICKINT_Msk;
}
#endif /* __rtems__ */
/**
* @brief Returns the HAL revision
@@ -380,8 +380,10 @@ HAL_StatusTypeDef HAL_ETH_Init(ETH_HandleTypeDef *heth)
/*------------------ MAC, MTL and DMA default Configuration ----------------*/
ETH_MACDMAConfig(heth);
#ifndef __rtems__
/* SET DSL to 64 bit */
MODIFY_REG(heth->Instance->DMACCR, ETH_DMACCR_DSL, ETH_DMACCR_DSL_64BIT);
#endif /* __rtems__ */
/* Set Receive Buffers Length (must be a multiple of 4) */
if ((heth->Init.RxBuffLen % 0x4U) != 0x0U)
@@ -458,6 +460,7 @@ HAL_StatusTypeDef HAL_ETH_DeInit(ETH_HandleTypeDef *heth)
return HAL_OK;
}
#ifndef __rtems__
/**
* @brief Initializes the ETH MSP.
* @param heth: pointer to a ETH_HandleTypeDef structure that contains
@@ -472,6 +475,7 @@ __weak void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
the HAL_ETH_MspInit could be implemented in the user file
*/
}
#endif /* __rtems__ */
/**
* @brief DeInitializes ETH MSP.
@@ -1151,6 +1155,7 @@ HAL_StatusTypeDef HAL_ETH_ReadData(ETH_HandleTypeDef *heth, void **pAppBuff)
*/
static void ETH_UpdateDescriptor(ETH_HandleTypeDef *heth)
{
#ifndef __rtems__
uint32_t descidx;
uint32_t tailidx;
uint32_t desccount;
@@ -1220,6 +1225,7 @@ static void ETH_UpdateDescriptor(ETH_HandleTypeDef *heth)
heth->RxDescList.RxBuildDescIdx = descidx;
heth->RxDescList.RxBuildDescCnt = desccount;
}
#endif /* ! __rtems__ */
}
/**
@@ -2977,6 +2983,7 @@ static void ETH_MACDMAConfig(ETH_HandleTypeDef *heth)
*/
static void ETH_DMATxDescListInit(ETH_HandleTypeDef *heth)
{
#ifndef __rtems__
ETH_DMADescTypeDef *dmatxdesc;
uint32_t i;
@@ -3004,6 +3011,7 @@ static void ETH_DMATxDescListInit(ETH_HandleTypeDef *heth)
/* Set Transmit Descriptor Tail pointer */
WRITE_REG(heth->Instance->DMACTDTPR, (uint32_t) heth->Init.TxDesc);
#endif /* __rtems__ */
}
/**
@@ -3015,6 +3023,7 @@ static void ETH_DMATxDescListInit(ETH_HandleTypeDef *heth)
*/
static void ETH_DMARxDescListInit(ETH_HandleTypeDef *heth)
{
#ifndef __rtems__
ETH_DMADescTypeDef *dmarxdesc;
uint32_t i;
@@ -3048,6 +3057,7 @@ static void ETH_DMARxDescListInit(ETH_HandleTypeDef *heth)
/* Set Receive Descriptor Tail pointer Address */
WRITE_REG(heth->Instance->DMACRDTPR, ((uint32_t)(heth->Init.RxDesc + (uint32_t)(ETH_RX_DESC_CNT - 1U))));
#endif /* __rtems__ */
}
/**
@@ -172,6 +172,7 @@
* @{
*/
#ifndef __rtems__
/**
* @brief Resets the RCC clock configuration to the default reset state.
* @note The default reset state of the clock configuration is given below:
@@ -387,6 +388,7 @@ HAL_StatusTypeDef HAL_RCC_DeInit(void)
return HAL_OK;
}
#endif /* __rtems__ */
/**
* @brief Initializes the RCC Oscillators according to the specified parameters in the
@@ -1234,7 +1236,11 @@ HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, ui
#endif /* DUAL_CORE && CORE_CM4 */
/* Configure the source of time base considering new system clocks settings*/
#ifndef __rtems__
halstatus = HAL_InitTick(uwTickPrio);
#else /* __rtems__ */
halstatus = HAL_OK;
#endif /* __rtems__ */
return halstatus;
}
@@ -608,6 +608,7 @@ HAL_StatusTypeDef HAL_SD_DeInit(SD_HandleTypeDef *hsd)
}
#ifndef __rtems__
/**
* @brief Initializes the SD MSP.
* @param hsd: Pointer to SD handle
@@ -622,6 +623,7 @@ __weak void HAL_SD_MspInit(SD_HandleTypeDef *hsd)
the HAL_SD_MspInit could be implemented in the user file
*/
}
#endif /* __rtems__ */
/**
* @brief De-Initialize SD MSP.
@@ -671,6 +671,7 @@ HAL_StatusTypeDef HAL_UART_DeInit(UART_HandleTypeDef *huart)
return HAL_OK;
}
#ifndef __rtems__
/**
* @brief Initialize the UART MSP.
* @param huart UART handle.
@@ -685,6 +686,7 @@ __weak void HAL_UART_MspInit(UART_HandleTypeDef *huart)
the HAL_UART_MspInit can be implemented in the user file
*/
}
#endif /* __rtems__ */
/**
* @brief DeInitialize the UART MSP.
@@ -373,6 +373,7 @@ HAL_StatusTypeDef HAL_USART_DeInit(USART_HandleTypeDef *husart)
return HAL_OK;
}
#ifndef __rtems__
/**
* @brief Initialize the USART MSP.
* @param husart USART handle.
@@ -387,6 +388,7 @@ __weak void HAL_USART_MspInit(USART_HandleTypeDef *husart)
the HAL_USART_MspInit can be implemented in the user file
*/
}
#endif /* __rtems__ */
/**
* @brief DeInitialize the USART MSP.
@@ -15,7 +15,7 @@
*
******************************************************************************
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/* Includes ------------------------------------------------------------------*/
#include "stm32h7xx_ll_adc.h"
@@ -16,7 +16,7 @@
******************************************************************************
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/* Includes ------------------------------------------------------------------*/
#include "stm32h7xx_ll_bdma.h"
@@ -15,7 +15,7 @@
*
******************************************************************************
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/* Includes ------------------------------------------------------------------*/
#include "stm32h7xx_ll_comp.h"
@@ -15,7 +15,7 @@
*
******************************************************************************
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/* Includes ------------------------------------------------------------------*/
#include "stm32h7xx_ll_cordic.h"
@@ -15,7 +15,7 @@
*
******************************************************************************
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/* Includes ------------------------------------------------------------------*/
#include "stm32h7xx_ll_crc.h"
@@ -15,7 +15,7 @@
*
******************************************************************************
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/* Includes ------------------------------------------------------------------*/
#include "stm32h7xx_ll_crs.h"
@@ -15,7 +15,7 @@
*
******************************************************************************
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/* Includes ------------------------------------------------------------------*/
#include "stm32h7xx_ll_dac.h"
@@ -15,7 +15,7 @@
*
******************************************************************************
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/* Includes ------------------------------------------------------------------*/
#include "stm32h7xx_ll_dma.h"
@@ -15,7 +15,7 @@
*
******************************************************************************
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/* Includes ------------------------------------------------------------------*/
#include "stm32h7xx_ll_dma2d.h"
@@ -15,7 +15,7 @@
*
******************************************************************************
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/* Includes ------------------------------------------------------------------*/
#include "stm32h7xx_ll_exti.h"
@@ -15,7 +15,7 @@
*
******************************************************************************
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/* Includes ------------------------------------------------------------------*/
#include "stm32h7xx_ll_fmac.h"
@@ -16,7 +16,7 @@
******************************************************************************
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/* Includes ------------------------------------------------------------------*/
#include "stm32h7xx_ll_gpio.h"
@@ -15,7 +15,7 @@
*
******************************************************************************
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/* Includes ------------------------------------------------------------------*/
#include "stm32h7xx_ll_hrtim.h"
@@ -15,7 +15,7 @@
*
******************************************************************************
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/* Includes ------------------------------------------------------------------*/
#include "stm32h7xx_ll_i2c.h"
@@ -15,7 +15,7 @@
*
******************************************************************************
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/* Includes ------------------------------------------------------------------*/
#include "stm32h7xx_ll_lptim.h"
@@ -15,7 +15,7 @@
*
******************************************************************************
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/* Includes ------------------------------------------------------------------*/
#include "stm32h7xx_ll_lpuart.h"
@@ -15,7 +15,7 @@
*
******************************************************************************
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/* Includes ------------------------------------------------------------------*/
#include "stm32h7xx_ll_mdma.h"
@@ -15,7 +15,7 @@
*
******************************************************************************
*/
#if defined(USE_FULL_LL_DRIVER)
#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
/* Includes ------------------------------------------------------------------*/
#include "stm32h7xx_ll_opamp.h"

Some files were not shown because too many files have changed in this diff Show More