Lines Matching defs:rate
124 #define UCHCOM_RESET_INDEX 0xD90A /* baud rate? */
669 uchcom_calc_baudrate_ch343(uint32_t rate, uint8_t *divisor, uint8_t *factor)
673 if (rate >= 256000)
675 else if (rate > 23529) {
678 } else if (rate > 2941) {
681 } else if (rate > 367) {
689 *factor = 256 - clk / rate;
693 uchcom_calc_divider_settings(struct uchcom_divider *dp, uint32_t rate)
701 if (dividers[i].dvr_high >= rate &&
702 dividers[i].dvr_low <= rate) {
714 div = rp->dvr_base_clock / rate;
715 rem = rp->dvr_base_clock % rate;
718 if ((rem<<1) >= rate)
723 mod = UCHCOM_BPS_MOD_BASE/rate + UCHCOM_BPS_MOD_BASE_OFS;
732 uchcom_set_dte_rate_ch343(struct uchcom_softc *sc, uint32_t rate, uint16_t val)
738 uchcom_calc_baudrate_ch343(rate, &div, &factor);
743 printf("%s: cannot set DTE rate: %s\n",
752 uchcom_set_dte_rate(struct uchcom_softc *sc, uint32_t rate)
757 if (uchcom_calc_divider_settings(&dv, rate))
766 printf("%s: cannot set DTE rate: %s\n",