@@ -159,13 +159,15 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
159159/** @defgroup COMP_WindowMode COMP Window Mode
160160 * @{
161161 */
162- #define COMP_WINDOWMODE_DISABLE (0x00000000UL) /*!< Window mode disable: Comparators instances
163- pair COMP1 and COMP2 are independent */
164- #define COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON (COMP_CSR_WINMODE) /*!< Window mode enable: Comparators instances
165- pair COMP1 and COMP2 have their input plus
166- connected together. The common input is
167- COMP1 input plus
168- (COMP2 input plus is no more accessible). */
162+ #define COMP_WINDOWMODE_DISABLE (0x00000000UL) /*!< Window mode disable: Comparators
163+ instances pair COMP1 and COMP2 are
164+ independent */
165+ #define COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON (COMP_CSR_WINMODE) /*!< Window mode enable: Comparators instances
166+ pair COMP1 and COMP2 have their input
167+ plus connected together.
168+ The common input is COMP1 input plus
169+ (COMP2 input plus is no more accessible).
170+ */
169171/**
170172 * @}
171173 */
@@ -383,16 +385,16 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
383385 * @brief Enable the COMP1 EXTI line rising & falling edge trigger.
384386 * @retval None
385387 */
386- #define __HAL_COMP_COMP1_EXTI_ENABLE_RISING_FALLING_EDGE () do { \
387- LL_EXTI_EnableRisingTrig_0_31(COMP_EXTI_LINE_COMP1); \
388- LL_EXTI_EnableFallingTrig_0_31(COMP_EXTI_LINE_COMP1);\
388+ #define __HAL_COMP_COMP1_EXTI_ENABLE_RISING_FALLING_EDGE () do { \
389+ LL_EXTI_EnableRisingTrig_0_31(COMP_EXTI_LINE_COMP1); \
390+ LL_EXTI_EnableFallingTrig_0_31(COMP_EXTI_LINE_COMP1); \
389391 } while(0)
390392
391393/**
392394 * @brief Disable the COMP1 EXTI line rising & falling edge trigger.
393395 * @retval None
394396 */
395- #define __HAL_COMP_COMP1_EXTI_DISABLE_RISING_FALLING_EDGE () do { \
397+ #define __HAL_COMP_COMP1_EXTI_DISABLE_RISING_FALLING_EDGE () do { \
396398 LL_EXTI_DisableRisingTrig_0_31(COMP_EXTI_LINE_COMP1); \
397399 LL_EXTI_DisableFallingTrig_0_31(COMP_EXTI_LINE_COMP1);\
398400 } while(0)
@@ -468,16 +470,16 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
468470 * @brief Enable the COMP2 EXTI line rising & falling edge trigger.
469471 * @retval None
470472 */
471- #define __HAL_COMP_COMP2_EXTI_ENABLE_RISING_FALLING_EDGE () do { \
472- LL_EXTI_EnableRisingTrig_0_31(COMP_EXTI_LINE_COMP2); \
473- LL_EXTI_EnableFallingTrig_0_31(COMP_EXTI_LINE_COMP2); \
473+ #define __HAL_COMP_COMP2_EXTI_ENABLE_RISING_FALLING_EDGE () do { \
474+ LL_EXTI_EnableRisingTrig_0_31(COMP_EXTI_LINE_COMP2); \
475+ LL_EXTI_EnableFallingTrig_0_31(COMP_EXTI_LINE_COMP2); \
474476 } while(0)
475477
476478/**
477479 * @brief Disable the COMP2 EXTI line rising & falling edge trigger.
478480 * @retval None
479481 */
480- #define __HAL_COMP_COMP2_EXTI_DISABLE_RISING_FALLING_EDGE () do { \
482+ #define __HAL_COMP_COMP2_EXTI_DISABLE_RISING_FALLING_EDGE () do { \
481483 LL_EXTI_DisableRisingTrig_0_31(COMP_EXTI_LINE_COMP2); \
482484 LL_EXTI_DisableFallingTrig_0_31(COMP_EXTI_LINE_COMP2);\
483485 } while(0)
@@ -613,25 +615,25 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
613615/* Note: On this STM32 series, comparator input minus parameters are */
614616/* the same on all COMP instances. */
615617/* However, comparator instance kept as macro parameter for */
616- /* compatibility with other STM32 families. */
618+ /* compatibility with other STM32 series. */
617619#if defined(COMP_INPUT_MINUS_IO2 )
618- #define IS_COMP_INPUT_MINUS (__COMP_INSTANCE__ , __INPUT_MINUS__ ) (((__INPUT_MINUS__) == COMP_INPUT_MINUS_1_4VREFINT) ||\
619- ((__INPUT_MINUS__) == COMP_INPUT_MINUS_1_2VREFINT) ||\
620- ((__INPUT_MINUS__) == COMP_INPUT_MINUS_3_4VREFINT) ||\
621- ((__INPUT_MINUS__) == COMP_INPUT_MINUS_VREFINT) ||\
622- ((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO1) ||\
623- ((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO2) ||\
624- ((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO3) ||\
625- ((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO4) ||\
620+ #define IS_COMP_INPUT_MINUS (__COMP_INSTANCE__ , __INPUT_MINUS__ ) (((__INPUT_MINUS__) == COMP_INPUT_MINUS_1_4VREFINT) || \
621+ ((__INPUT_MINUS__) == COMP_INPUT_MINUS_1_2VREFINT) || \
622+ ((__INPUT_MINUS__) == COMP_INPUT_MINUS_3_4VREFINT) || \
623+ ((__INPUT_MINUS__) == COMP_INPUT_MINUS_VREFINT) || \
624+ ((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO1) || \
625+ ((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO2) || \
626+ ((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO3) || \
627+ ((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO4) || \
626628 ((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO5))
627629#else
628- #define IS_COMP_INPUT_MINUS (__COMP_INSTANCE__ , __INPUT_MINUS__ ) (((__INPUT_MINUS__) == COMP_INPUT_MINUS_1_4VREFINT) ||\
629- ((__INPUT_MINUS__) == COMP_INPUT_MINUS_1_2VREFINT) ||\
630- ((__INPUT_MINUS__) == COMP_INPUT_MINUS_3_4VREFINT) ||\
631- ((__INPUT_MINUS__) == COMP_INPUT_MINUS_VREFINT) ||\
632- ((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO1) ||\
633- ((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO3) ||\
634- ((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO4) ||\
630+ #define IS_COMP_INPUT_MINUS (__COMP_INSTANCE__ , __INPUT_MINUS__ ) (((__INPUT_MINUS__) == COMP_INPUT_MINUS_1_4VREFINT) || \
631+ ((__INPUT_MINUS__) == COMP_INPUT_MINUS_1_2VREFINT) || \
632+ ((__INPUT_MINUS__) == COMP_INPUT_MINUS_3_4VREFINT) || \
633+ ((__INPUT_MINUS__) == COMP_INPUT_MINUS_VREFINT) || \
634+ ((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO1) || \
635+ ((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO3) || \
636+ ((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO4) || \
635637 ((__INPUT_MINUS__) == COMP_INPUT_MINUS_IO5))
636638#endif
637639
@@ -644,9 +646,9 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
644646 ((__POL__) == COMP_OUTPUTPOL_INVERTED))
645647
646648#define IS_COMP_BLANKINGSRCE (__OUTPUT_BLANKING_SOURCE__ ) \
647- ( ((__OUTPUT_BLANKING_SOURCE__) == COMP_BLANKINGSRC_NONE) \
648- || ((__OUTPUT_BLANKING_SOURCE__) == COMP_BLANKINGSRC_TIM1_OC5) \
649- || ((__OUTPUT_BLANKING_SOURCE__) == COMP_BLANKINGSRC_TIM2_OC3) \
649+ (((__OUTPUT_BLANKING_SOURCE__) == COMP_BLANKINGSRC_NONE) \
650+ || ((__OUTPUT_BLANKING_SOURCE__) == COMP_BLANKINGSRC_TIM1_OC5) \
651+ || ((__OUTPUT_BLANKING_SOURCE__) == COMP_BLANKINGSRC_TIM2_OC3) \
650652 )
651653
652654/* Note: Output blanking source common to all COMP instances */
0 commit comments