Prusa MINI Firmware overview
RCC Private macros to check input parameters
Collaboration diagram for RCC Private macros to check input parameters:

Macros

#define IS_RCC_OSCILLATORTYPE(OSCILLATOR)   ((OSCILLATOR) <= 15U)
 
#define IS_RCC_HSE(HSE)
 
#define IS_RCC_LSE(LSE)
 
#define IS_RCC_HSI(HSI)   (((HSI) == RCC_HSI_OFF) || ((HSI) == RCC_HSI_ON))
 
#define IS_RCC_LSI(LSI)   (((LSI) == RCC_LSI_OFF) || ((LSI) == RCC_LSI_ON))
 
#define IS_RCC_PLL(PLL)   (((PLL) == RCC_PLL_NONE) ||((PLL) == RCC_PLL_OFF) || ((PLL) == RCC_PLL_ON))
 
#define IS_RCC_PLLSOURCE(SOURCE)
 
#define IS_RCC_SYSCLKSOURCE(SOURCE)
 
#define IS_RCC_RTCCLKSOURCE(__SOURCE__)
 
#define IS_RCC_PLLM_VALUE(VALUE)   ((VALUE) <= 63U)
 
#define IS_RCC_PLLP_VALUE(VALUE)   (((VALUE) == 2U) || ((VALUE) == 4U) || ((VALUE) == 6U) || ((VALUE) == 8U))
 
#define IS_RCC_PLLQ_VALUE(VALUE)   ((2U <= (VALUE)) && ((VALUE) <= 15U))
 
#define IS_RCC_HCLK(HCLK)
 
#define IS_RCC_CLOCKTYPE(CLK)   ((1U <= (CLK)) && ((CLK) <= 15U))
 
#define IS_RCC_PCLK(PCLK)
 
#define IS_RCC_MCO(MCOx)   (((MCOx) == RCC_MCO1) || ((MCOx) == RCC_MCO2))
 
#define IS_RCC_MCO1SOURCE(SOURCE)
 
#define IS_RCC_MCODIV(DIV)
 
#define IS_RCC_CALIBRATION_VALUE(VALUE)   ((VALUE) <= 0x1FU)
 

Detailed Description

Macro Definition Documentation

◆ IS_RCC_OSCILLATORTYPE

#define IS_RCC_OSCILLATORTYPE (   OSCILLATOR)    ((OSCILLATOR) <= 15U)

◆ IS_RCC_HSE

#define IS_RCC_HSE (   HSE)
Value:
(((HSE) == RCC_HSE_OFF) || ((HSE) == RCC_HSE_ON) || \
((HSE) == RCC_HSE_BYPASS))

◆ IS_RCC_LSE

#define IS_RCC_LSE (   LSE)
Value:
(((LSE) == RCC_LSE_OFF) || ((LSE) == RCC_LSE_ON) || \
((LSE) == RCC_LSE_BYPASS))

◆ IS_RCC_HSI

#define IS_RCC_HSI (   HSI)    (((HSI) == RCC_HSI_OFF) || ((HSI) == RCC_HSI_ON))

◆ IS_RCC_LSI

#define IS_RCC_LSI (   LSI)    (((LSI) == RCC_LSI_OFF) || ((LSI) == RCC_LSI_ON))

◆ IS_RCC_PLL

#define IS_RCC_PLL (   PLL)    (((PLL) == RCC_PLL_NONE) ||((PLL) == RCC_PLL_OFF) || ((PLL) == RCC_PLL_ON))

◆ IS_RCC_PLLSOURCE

#define IS_RCC_PLLSOURCE (   SOURCE)
Value:
(((SOURCE) == RCC_PLLSOURCE_HSI) || \
((SOURCE) == RCC_PLLSOURCE_HSE))

◆ IS_RCC_SYSCLKSOURCE

#define IS_RCC_SYSCLKSOURCE (   SOURCE)
Value:
(((SOURCE) == RCC_SYSCLKSOURCE_HSI) || \
((SOURCE) == RCC_SYSCLKSOURCE_HSE) || \
((SOURCE) == RCC_SYSCLKSOURCE_PLLCLK) || \
((SOURCE) == RCC_SYSCLKSOURCE_PLLRCLK))

◆ IS_RCC_RTCCLKSOURCE

#define IS_RCC_RTCCLKSOURCE (   __SOURCE__)

◆ IS_RCC_PLLM_VALUE

#define IS_RCC_PLLM_VALUE (   VALUE)    ((VALUE) <= 63U)

◆ IS_RCC_PLLP_VALUE

#define IS_RCC_PLLP_VALUE (   VALUE)    (((VALUE) == 2U) || ((VALUE) == 4U) || ((VALUE) == 6U) || ((VALUE) == 8U))

◆ IS_RCC_PLLQ_VALUE

#define IS_RCC_PLLQ_VALUE (   VALUE)    ((2U <= (VALUE)) && ((VALUE) <= 15U))

◆ IS_RCC_HCLK

#define IS_RCC_HCLK (   HCLK)
Value:
(((HCLK) == RCC_SYSCLK_DIV1) || ((HCLK) == RCC_SYSCLK_DIV2) || \
((HCLK) == RCC_SYSCLK_DIV4) || ((HCLK) == RCC_SYSCLK_DIV8) || \
((HCLK) == RCC_SYSCLK_DIV16) || ((HCLK) == RCC_SYSCLK_DIV64) || \
((HCLK) == RCC_SYSCLK_DIV128) || ((HCLK) == RCC_SYSCLK_DIV256) || \
((HCLK) == RCC_SYSCLK_DIV512))

◆ IS_RCC_CLOCKTYPE

#define IS_RCC_CLOCKTYPE (   CLK)    ((1U <= (CLK)) && ((CLK) <= 15U))

◆ IS_RCC_PCLK

#define IS_RCC_PCLK (   PCLK)
Value:
(((PCLK) == RCC_HCLK_DIV1) || ((PCLK) == RCC_HCLK_DIV2) || \
((PCLK) == RCC_HCLK_DIV4) || ((PCLK) == RCC_HCLK_DIV8) || \
((PCLK) == RCC_HCLK_DIV16))

◆ IS_RCC_MCO

#define IS_RCC_MCO (   MCOx)    (((MCOx) == RCC_MCO1) || ((MCOx) == RCC_MCO2))

◆ IS_RCC_MCO1SOURCE

#define IS_RCC_MCO1SOURCE (   SOURCE)
Value:
(((SOURCE) == RCC_MCO1SOURCE_HSI) || ((SOURCE) == RCC_MCO1SOURCE_LSE) || \
((SOURCE) == RCC_MCO1SOURCE_HSE) || ((SOURCE) == RCC_MCO1SOURCE_PLLCLK))

◆ IS_RCC_MCODIV

#define IS_RCC_MCODIV (   DIV)
Value:
(((DIV) == RCC_MCODIV_1) || ((DIV) == RCC_MCODIV_2) || \
((DIV) == RCC_MCODIV_3) || ((DIV) == RCC_MCODIV_4) || \
((DIV) == RCC_MCODIV_5))

◆ IS_RCC_CALIBRATION_VALUE

#define IS_RCC_CALIBRATION_VALUE (   VALUE)    ((VALUE) <= 0x1FU)
RCC_MCO1SOURCE_HSE
#define RCC_MCO1SOURCE_HSE
Definition: stm32f4xx_hal_rcc.h:323
RCC_MCO1SOURCE_HSI
#define RCC_MCO1SOURCE_HSI
Definition: stm32f4xx_hal_rcc.h:321
RCC_SYSCLK_DIV2
#define RCC_SYSCLK_DIV2
Definition: stm32f4xx_hal_rcc.h:244
RCC_HCLK_DIV2
#define RCC_HCLK_DIV2
Definition: stm32f4xx_hal_rcc.h:260
RCC_SYSCLKSOURCE_HSI
#define RCC_SYSCLKSOURCE_HSI
Definition: stm32f4xx_hal_rcc.h:219
RCC_SYSCLK_DIV512
#define RCC_SYSCLK_DIV512
Definition: stm32f4xx_hal_rcc.h:251
RCC_HSE_ON
#define RCC_HSE_ON
Definition: stm32f4xx_hal_rcc.h:137
RCC_MCODIV_1
#define RCC_MCODIV_1
Definition: stm32f4xx_hal_rcc.h:332
RCC_SYSCLK_DIV64
#define RCC_SYSCLK_DIV64
Definition: stm32f4xx_hal_rcc.h:248
RCC_MCO1SOURCE_LSE
#define RCC_MCO1SOURCE_LSE
Definition: stm32f4xx_hal_rcc.h:322
RCC_SYSCLK_DIV4
#define RCC_SYSCLK_DIV4
Definition: stm32f4xx_hal_rcc.h:245
RCC_SYSCLK_DIV256
#define RCC_SYSCLK_DIV256
Definition: stm32f4xx_hal_rcc.h:250
RCC_HCLK_DIV1
#define RCC_HCLK_DIV1
Definition: stm32f4xx_hal_rcc.h:259
RCC_HCLK_DIV8
#define RCC_HCLK_DIV8
Definition: stm32f4xx_hal_rcc.h:262
RCC_SYSCLKSOURCE_HSE
#define RCC_SYSCLKSOURCE_HSE
Definition: stm32f4xx_hal_rcc.h:220
RCC_PLLSOURCE_HSE
#define RCC_PLLSOURCE_HSE
Definition: stm32f4xx_hal_rcc.h:198
RCC_HCLK_DIV4
#define RCC_HCLK_DIV4
Definition: stm32f4xx_hal_rcc.h:261
RCC_MCODIV_4
#define RCC_MCODIV_4
Definition: stm32f4xx_hal_rcc.h:335
RCC_SYSCLKSOURCE_PLLRCLK
#define RCC_SYSCLKSOURCE_PLLRCLK
Definition: stm32f4xx_hal_rcc.h:222
RCC_LSE_ON
#define RCC_LSE_ON
Definition: stm32f4xx_hal_rcc.h:147
RCC_SYSCLK_DIV16
#define RCC_SYSCLK_DIV16
Definition: stm32f4xx_hal_rcc.h:247
RCC_HCLK_DIV16
#define RCC_HCLK_DIV16
Definition: stm32f4xx_hal_rcc.h:263
RCC_LSE_OFF
#define RCC_LSE_OFF
Definition: stm32f4xx_hal_rcc.h:146
RCC_PLLSOURCE_HSI
#define RCC_PLLSOURCE_HSI
Definition: stm32f4xx_hal_rcc.h:197
RCC_SYSCLK_DIV1
#define RCC_SYSCLK_DIV1
Definition: stm32f4xx_hal_rcc.h:243
RCC_HSE_OFF
#define RCC_HSE_OFF
Definition: stm32f4xx_hal_rcc.h:136
RCC_LSE_BYPASS
#define RCC_LSE_BYPASS
Definition: stm32f4xx_hal_rcc.h:148
RCC_MCODIV_5
#define RCC_MCODIV_5
Definition: stm32f4xx_hal_rcc.h:336
RCC_SYSCLKSOURCE_PLLCLK
#define RCC_SYSCLKSOURCE_PLLCLK
Definition: stm32f4xx_hal_rcc.h:221
RCC_HSE_BYPASS
#define RCC_HSE_BYPASS
Definition: stm32f4xx_hal_rcc.h:138
RCC_SYSCLK_DIV128
#define RCC_SYSCLK_DIV128
Definition: stm32f4xx_hal_rcc.h:249
RCC_MCODIV_3
#define RCC_MCODIV_3
Definition: stm32f4xx_hal_rcc.h:334
RCC_SYSCLK_DIV8
#define RCC_SYSCLK_DIV8
Definition: stm32f4xx_hal_rcc.h:246
RCC_MCODIV_2
#define RCC_MCODIV_2
Definition: stm32f4xx_hal_rcc.h:333
RCC_MCO1SOURCE_PLLCLK
#define RCC_MCO1SOURCE_PLLCLK
Definition: stm32f4xx_hal_rcc.h:324