181 #define COMP_CSR_CLEAR_MASK ((uint32_t)0x00000003) 217 *(
__IO uint32_t *) (COMP_BASE + COMP_Selection) = ((uint32_t)0x00000000);
257 tmpreg = *(
__IO uint32_t *) (COMP_BASE + COMP_Selection);
275 *(
__IO uint32_t *) (COMP_BASE + COMP_Selection) = tmpreg;
320 *(
__IO uint32_t *) (COMP_BASE + COMP_Selection) |= (uint32_t) (COMP_CSR_COMPxEN);
325 *(
__IO uint32_t *) (COMP_BASE + COMP_Selection) &= (uint32_t)(~COMP_CSR_COMPxEN);
349 *(
__IO uint32_t *) (COMP_BASE + COMP_Selection) |= (uint32_t) (COMP_CSR_COMP1SW1);
354 *(
__IO uint32_t *) (COMP_BASE + COMP_Selection) &= (uint32_t)(~COMP_CSR_COMP1SW1);
379 uint32_t compout = 0x0;
385 if ((*(
__IO uint32_t *) (COMP_BASE + COMP_Selection) & (COMP_CSR_COMPxOUT)) != 0)
395 return (uint32_t)(compout);
443 *(
__IO uint32_t *) (COMP_BASE + COMP_Selection) |= (uint32_t) COMP_CSR_COMPxWNDWEN;
448 *(
__IO uint32_t *) (COMP_BASE + COMP_Selection) &= (uint32_t)(~COMP_CSR_COMPxWNDWEN);
485 *(
__IO uint32_t *) (COMP_BASE + COMP_Selection) |= (uint32_t) (COMP_CSR_COMPxLOCK);
uint32_t COMP_NonInvertingInput
#define COMP_Hysteresis_No
uint32_t COMP_GetOutputLevel(uint32_t COMP_Selection)
Return the output level (high or low) of the selected comparator. The output level depends on the sel...
#define IS_COMP_HYSTERESIS(HYSTERESIS)
void assert_param(int val)
#define IS_COMP_MODE(MODE)
void COMP_WindowCmd(uint32_t COMP_Selection, FunctionalState NewState)
Enables or disables the window mode. Window mode for comparators makes use of two comparators: COMP1 ...
void COMP_SwitchCmd(uint32_t COMP_Selection, FunctionalState NewState)
Close or Open the SW1 switch.
void COMP_StructInit(COMP_InitTypeDef *COMP_InitStruct)
Fills each COMP_InitStruct member with its default value.
#define IS_FUNCTIONAL_STATE(STATE)
#define IS_COMP_WINDOW(WINDOW)
uint32_t COMP_BlankingSrce
void COMP_Init(uint32_t COMP_Selection, COMP_InitTypeDef *COMP_InitStruct)
Initializes the COMP peripheral according to the specified parameters in COMP_InitStruct.
#define COMP_CSR_CLEAR_MASK
void COMP_Cmd(uint32_t COMP_Selection, FunctionalState NewState)
Enable or disable the COMP peripheral.
This file contains all the functions prototypes for the COMP firmware library.
#define IS_COMP_BLANKING_SOURCE(SOURCE)
COMP Init structure definition.
#define COMP_BlankingSrce_None
void COMP_LockConfig(uint32_t COMP_Selection)
Lock the selected comparator (COMP1/COMP2) configuration.
#define COMP_OutputLevel_Low
void COMP_DeInit(uint32_t COMP_Selection)
Deinitializes COMP peripheral registers to their default reset values.
uint32_t COMP_InvertingInput
#define IS_COMP_OUTPUT_POL(POL)
#define COMP_OutputPol_NonInverted
#define COMP_Mode_UltraLowPower
#define IS_COMP_ALL_PERIPH(PERIPH)
#define COMP_OutputLevel_High
#define IS_COMP_OUTPUT(OUTPUT)