/* get ovsr & ovsr_adj parameters according to the given baudrate and UART IP clock.  */
void USI_UARTBaudParaGetFull(u32 IPclk, u32 baudrate, u32 *ovsr, u32 *ovsr_adj)
/* get ovsr & ovsr_adj parameters according to the given baudrate and UART IP clock.  */
void USI_UARTBaudParaGetFull(u32 IPclk, u32 baudrate, u32 *ovsr, u32 *ovsr_adj)
{
	u32 i;
	u32 Remainder;
	u32 TempAdj = 0;
	u32 TempMultly;
	*ovsr = IPclk / baudrate;
	Remainder = IPclk % baudrate;
	for(i = 0; i < 11; i++){
		TempAdj = TempAdj << 1;
		TempMultly = (Remainder * (12-i));
		TempAdj |= ((TempMultly / baudrate - (TempMultly - Remainder) / baudrate) ? 1 : 0);
	}
	*ovsr_adj = TempAdj;
}