Searched refs:diff1 (Results 1 – 2 of 2) sorted by relevance
106 unsigned int diff1, diff2, tmp, rate; in lpuart32_serial_setbrg() local122 diff1 = rate / (tmp_osr * tmp_sbr) - baudrate; in lpuart32_serial_setbrg()126 if (diff1 > (baudrate - diff2)) { in lpuart32_serial_setbrg()127 diff1 = baudrate - diff2; in lpuart32_serial_setbrg()131 if (diff1 <= baud_diff) { in lpuart32_serial_setbrg()132 baud_diff = diff1; in lpuart32_serial_setbrg()
95 unsigned int diff1, diff2, tmp, rate; in lpuart32_serial_setbrg() local111 diff1 = rate / (tmp_osr * tmp_sbr) - baudrate; in lpuart32_serial_setbrg()115 if (diff1 > (baudrate - diff2)) { in lpuart32_serial_setbrg()116 diff1 = baudrate - diff2; in lpuart32_serial_setbrg()120 if (diff1 <= baud_diff) { in lpuart32_serial_setbrg()121 baud_diff = diff1; in lpuart32_serial_setbrg()
Completed in 3 milliseconds