Martin Johnson / STM32F3-Discovery

Dependents:   Space_Invaders_Demo neopixels gpio_test_stm32f3_discovery gpio_test_systimer ... more

Embed: (wiki syntax)

« Back to documentation index

Window mode control function

Window mode control function
[COMP_Private_Functions]

Window mode control function. More...

Functions

void COMP_WindowCmd (uint32_t COMP_Selection, FunctionalState NewState)
 Enables or disables the window mode.

Detailed Description

Window mode control function.

 ===============================================================================
                    ##### Window mode control function #####
 ===============================================================================  


Function Documentation

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 and COM2, COMP3 and COMP4, COMP5 and COMP6. In window mode, COMPx and COMPx-1 (where x can be 2, 4 or 6) non inverting inputs are connected together and only COMPx-1 non inverting input can be used. e.g When window mode enabled for COMP4, COMP3 non inverting input (PB14 or PD14) is to be used.

Note:
If the COMPx is locked, ENABLE/DISABLE the window mode can't be performed. To unlock the configuration, perform a system reset.
Parameters:
COMP_Selection,:the selected comparator. This parameter can be COMP_Selection_COMPx where x can be 2, 4 or 6 to select the COMP peripheral. param NewState: new state of the window mode. This parameter can be ENABLE or DISABLE. When enbaled, COMPx and COMPx-1 non inverting inputs are connected together. When disabled, COMPx and COMPx-1 non inverting inputs are disconnected.
Return values:
None

Definition at line 437 of file stm32f30x_comp.c.