/* Set the reload value of RXPOSTC and control of RXTC.  */
void SGPIO_RXPosConfig(SGPIO_TypeDef *SGPIOx, u32 SGPIO_PosRstVal, u32 SGPIO_RXPOSCtl)
/* Set the reload value of RXPOSTC and control of RXTC.  */
void SGPIO_RXPosConfig(SGPIO_TypeDef *SGPIOx, u32 SGPIO_PosRstVal, u32 SGPIO_RXPOSCtl)
{
	u32 TempVal;
	assert_param(IS_SGPIO_ALL_PERIPH(SGPIOx));
	assert_param(SGPIO_PosRstVal <= 0x1f);
	TempVal = SGPIOx->SGPIO_RXMC_CTRL;
	TempVal &= (~BIT_SGPIO_RX_POS_CTRL);
	TempVal |= SGPIO_RXPOSCtl;
	SGPIOx->SGPIO_RXMC_CTRL = TempVal;
	TempVal = SGPIOx->SGPIO_RXPOSR;
	TempVal &= (~BIT_SGPIO_RXPOSRST);
	TempVal |= (SGPIO_PosRstVal << 8);
	SGPIOx->SGPIO_RXPOSR = TempVal;
}