STM8S/A Standard Peripherals Drivers: CLK_Private_Macros

STM8S/A Standard Peripherals Library

STM8S/A Standard Peripherals Drivers
CLK_Private_Macros

Defines

#define IS_CLK_CSSCONFIG_OK(CSSVALUE)
 Macros used by the assert function in order to check the CSS configuration.
#define IS_CLK_CURRENTCLOCKSTATE_OK(STATE)
 Macros used by the assert function in order to check the current clock state.
#define IS_CLK_FLAG_OK(FLAG)
 Macros used by the assert function in order to check the different clock flags.
#define IS_CLK_HSIPRESCALER_OK(PRESCALER)
 Macros used by the assert function in order to check the different HSI prescaler values.
#define IS_CLK_HSITRIMVALUE_OK(TRIMVALUE)
 Macros used by the assert function in order to check the different HSI trimming values.
#define IS_CLK_IT_OK(IT)   (((IT) == CLK_IT_CSSD) || ((IT) == CLK_IT_SWIF))
 Macros used by the assert function in order to check the different clock IT pending bits.
#define IS_CLK_OUTPUT_OK(OUTPUT)
 Macros used by the assert function in order to check the different clocks to output.
#define IS_CLK_PERIPHERAL_OK(PERIPHERAL)
 Macros used by the assert function in order to check the different peripheral's clock.
#define IS_CLK_PRESCALER_OK(PRESCALER)
 Macros used by the assert function in order to check the different clock prescaler values.
#define IS_CLK_SOURCE_OK(SOURCE)
 Macros used by the assert function in order to check the different clock sources.
#define IS_CLK_SWIMDIVIDER_OK(SWIMDIVIDER)   (((SWIMDIVIDER) == CLK_SWIMDIVIDER_2) || ((SWIMDIVIDER) == CLK_SWIMDIVIDER_OTHER))
 Macros used by the assert function in order to check the different SWIM dividers values.
#define IS_CLK_SWITCHMODE_OK(MODE)   (((MODE) == CLK_SWITCHMODE_MANUAL) || ((MODE) == CLK_SWITCHMODE_AUTO))
 Macros used by the assert function in order to check the different functions parameters.

Define Documentation

#define IS_CLK_CSSCONFIG_OK (   CSSVALUE)
Value:
(((CSSVALUE) == CLK_CSSCONFIG_ENABLEWITHIT) ||\
                                       ((CSSVALUE) == CLK_CSSCONFIG_ENABLE) ||\
                                       ((CSSVALUE) == CLK_CSSCONFIG_DISABLE))

Macros used by the assert function in order to check the CSS configuration.

Definition at line 240 of file stm8s_clk.h.

#define IS_CLK_CURRENTCLOCKSTATE_OK (   STATE)
Value:

Macros used by the assert function in order to check the current clock state.

Definition at line 234 of file stm8s_clk.h.

Referenced by CLK_ClockSwitchConfig().

#define IS_CLK_FLAG_OK (   FLAG)
Value:
(((FLAG) == CLK_FLAG_LSIRDY) ||\
                              ((FLAG) == CLK_FLAG_HSIRDY) ||\
                              ((FLAG) == CLK_FLAG_HSERDY) ||\
                              ((FLAG) == CLK_FLAG_SWIF) ||\
                              ((FLAG) == CLK_FLAG_SWBSY) ||\
                              ((FLAG) == CLK_FLAG_CSSD) ||\
                              ((FLAG) == CLK_FLAG_AUX) ||\
                              ((FLAG) == CLK_FLAG_CCOBSY) ||\
                              ((FLAG) == CLK_FLAG_CCORDY))

Macros used by the assert function in order to check the different clock flags.

Definition at line 301 of file stm8s_clk.h.

Referenced by CLK_GetFlagStatus().

#define IS_CLK_HSIPRESCALER_OK (   PRESCALER)
Value:
(((PRESCALER) == CLK_PRESCALER_HSIDIV1) ||\
    ((PRESCALER) == CLK_PRESCALER_HSIDIV2) ||\
    ((PRESCALER) == CLK_PRESCALER_HSIDIV4) ||\
    ((PRESCALER) == CLK_PRESCALER_HSIDIV8))

Macros used by the assert function in order to check the different HSI prescaler values.

Definition at line 319 of file stm8s_clk.h.

Referenced by CLK_HSIPrescalerConfig().

#define IS_CLK_HSITRIMVALUE_OK (   TRIMVALUE)
Value:
(((TRIMVALUE) == CLK_HSITRIMVALUE_0) ||\
    ((TRIMVALUE) == CLK_HSITRIMVALUE_1) ||\
    ((TRIMVALUE) == CLK_HSITRIMVALUE_2) ||\
    ((TRIMVALUE) == CLK_HSITRIMVALUE_3) ||\
    ((TRIMVALUE) == CLK_HSITRIMVALUE_4) ||\
    ((TRIMVALUE) == CLK_HSITRIMVALUE_5) ||\
    ((TRIMVALUE) == CLK_HSITRIMVALUE_6) ||\
    ((TRIMVALUE) == CLK_HSITRIMVALUE_7))

Macros used by the assert function in order to check the different HSI trimming values.

Definition at line 254 of file stm8s_clk.h.

Referenced by CLK_AdjustHSICalibrationValue().

#define IS_CLK_IT_OK (   IT)    (((IT) == CLK_IT_CSSD) || ((IT) == CLK_IT_SWIF))

Macros used by the assert function in order to check the different clock IT pending bits.

Definition at line 314 of file stm8s_clk.h.

Referenced by CLK_ClearITPendingBit(), CLK_GetITStatus(), and CLK_ITConfig().

#define IS_CLK_OUTPUT_OK (   OUTPUT)
Value:
(((OUTPUT) == CLK_OUTPUT_HSI) ||\
                                  ((OUTPUT) == CLK_OUTPUT_HSE) ||\
                                  ((OUTPUT) == CLK_OUTPUT_LSI) ||\
                                  ((OUTPUT) == CLK_OUTPUT_CPU) ||\
                                  ((OUTPUT) == CLK_OUTPUT_CPUDIV2) ||\
                                  ((OUTPUT) == CLK_OUTPUT_CPUDIV4) ||\
                                  ((OUTPUT) == CLK_OUTPUT_CPUDIV8) ||\
                                  ((OUTPUT) == CLK_OUTPUT_CPUDIV16) ||\
                                  ((OUTPUT) == CLK_OUTPUT_CPUDIV32) ||\
                                  ((OUTPUT) == CLK_OUTPUT_CPUDIV64) ||\
                                  ((OUTPUT) == CLK_OUTPUT_HSIRC) ||\
                                  ((OUTPUT) == CLK_OUTPUT_MASTER) ||\
                                  ((OUTPUT) == CLK_OUTPUT_OTHERS))

Macros used by the assert function in order to check the different clocks to output.

Definition at line 266 of file stm8s_clk.h.

Referenced by CLK_CCOConfig().

#define IS_CLK_PERIPHERAL_OK (   PERIPHERAL)
Value:
(((PERIPHERAL) == CLK_PERIPHERAL_I2C) ||\
    ((PERIPHERAL) == CLK_PERIPHERAL_SPI) ||\
    ((PERIPHERAL) == CLK_PERIPHERAL_UART3) ||\
    ((PERIPHERAL) == CLK_PERIPHERAL_UART2) ||\
    ((PERIPHERAL) == CLK_PERIPHERAL_UART1) ||\
    ((PERIPHERAL) == CLK_PERIPHERAL_TIMER4) ||\
    ((PERIPHERAL) == CLK_PERIPHERAL_TIMER2) ||\
    ((PERIPHERAL) == CLK_PERIPHERAL_TIMER5) ||\
    ((PERIPHERAL) == CLK_PERIPHERAL_TIMER6) ||\
    ((PERIPHERAL) == CLK_PERIPHERAL_TIMER3) ||\
    ((PERIPHERAL) == CLK_PERIPHERAL_TIMER1) ||\
    ((PERIPHERAL) == CLK_PERIPHERAL_CAN) ||\
    ((PERIPHERAL) == CLK_PERIPHERAL_ADC) ||\
    ((PERIPHERAL) == CLK_PERIPHERAL_AWU))

Macros used by the assert function in order to check the different peripheral's clock.

Definition at line 283 of file stm8s_clk.h.

Referenced by CLK_PeripheralClockConfig().

#define IS_CLK_PRESCALER_OK (   PRESCALER)
Value:
(((PRESCALER) == CLK_PRESCALER_HSIDIV1) ||\
                                        ((PRESCALER) == CLK_PRESCALER_HSIDIV2) ||\
                                        ((PRESCALER) == CLK_PRESCALER_HSIDIV4) ||\
                                        ((PRESCALER) == CLK_PRESCALER_HSIDIV8) ||\
                                        ((PRESCALER) == CLK_PRESCALER_CPUDIV1) ||\
                                        ((PRESCALER) == CLK_PRESCALER_CPUDIV2) ||\
                                        ((PRESCALER) == CLK_PRESCALER_CPUDIV4) ||\
                                        ((PRESCALER) == CLK_PRESCALER_CPUDIV8) ||\
                                        ((PRESCALER) == CLK_PRESCALER_CPUDIV16) ||\
                                        ((PRESCALER) == CLK_PRESCALER_CPUDIV32) ||\
                                        ((PRESCALER) == CLK_PRESCALER_CPUDIV64) ||\
                                        ((PRESCALER) == CLK_PRESCALER_CPUDIV128))

Macros used by the assert function in order to check the different clock prescaler values.

Definition at line 327 of file stm8s_clk.h.

Referenced by CLK_SYSCLKConfig().

#define IS_CLK_SOURCE_OK (   SOURCE)
Value:
(((SOURCE) == CLK_SOURCE_HSI) ||\
                                  ((SOURCE) == CLK_SOURCE_LSI) ||\
                                  ((SOURCE) == CLK_SOURCE_HSE))

Macros used by the assert function in order to check the different clock sources.

Definition at line 247 of file stm8s_clk.h.

Referenced by CLK_ClockSwitchConfig().

#define IS_CLK_SWIMDIVIDER_OK (   SWIMDIVIDER)    (((SWIMDIVIDER) == CLK_SWIMDIVIDER_2) || ((SWIMDIVIDER) == CLK_SWIMDIVIDER_OTHER))

Macros used by the assert function in order to check the different SWIM dividers values.

Definition at line 343 of file stm8s_clk.h.

Referenced by CLK_SWIMConfig().

#define IS_CLK_SWITCHMODE_OK (   MODE)    (((MODE) == CLK_SWITCHMODE_MANUAL) || ((MODE) == CLK_SWITCHMODE_AUTO))

Macros used by the assert function in order to check the different functions parameters.

Macros used by the assert function in order to check the clock switching modes.

Definition at line 229 of file stm8s_clk.h.

Referenced by CLK_ClockSwitchConfig().

STM8 Standard Peripherals Library: Footer

 

 

 

      For complete documentation on STM8 8-bit Microcontrollers platform visit www.st.com