board/lgvr/usb_pd_config.h
/* we know the plug polarity, do the right configuration */
we know the plug polarity, do the right configuration
we know the plug polarity do the right configuration
static inline void pd_select_polarity(int port, int polarity)
{
	STM32_COMP_CSR = (STM32_COMP_CSR
		& ~(STM32_COMP_CMP1INSEL_MASK | STM32_COMP_CMP2INSEL_MASK
		  |STM32_COMP_CMP1EN | STM32_COMP_CMP2EN))
		| STM32_COMP_CMP1INSEL_VREF12 | STM32_COMP_CMP2INSEL_VREF12
		| (polarity ? STM32_COMP_CMP2EN : STM32_COMP_CMP1EN);
}
static inline void pd_select_polarity ( int port , int polarity ) { STM32_COMP_CSR = ( STM32_COMP_CSR & ~ ( STM32_COMP_CMP1INSEL_MASK | STM32_COMP_CMP2INSEL_MASK | STM32_COMP_CMP1EN | STM32_COMP_CMP2EN ) ) | STM32_COMP_CMP1INSEL_VREF12 | STM32_COMP_CMP2INSEL_VREF12 | ( polarity ? STM32_COMP_CMP2EN : STM32_COMP_CMP1EN ) ; }
we know the plug polarity, do the right configuration
we know the plug polarity do the right configuration