Lines Matching refs:tseg1
114 uint16_t tseg1, tseg2; in update_sampling_pnt() local
121 tseg1 = total_tq - CAN_SYNC_SEG - tseg2; in update_sampling_pnt()
122 if (tseg1 > tseg1_max) { in update_sampling_pnt()
124 tseg1 = tseg1_max; in update_sampling_pnt()
125 tseg2 = total_tq - CAN_SYNC_SEG - tseg1; in update_sampling_pnt()
129 } else if (tseg1 < tseg1_min) { in update_sampling_pnt()
131 tseg1 = tseg1_min; in update_sampling_pnt()
132 tseg2 = total_tq - CAN_SYNC_SEG - tseg1; in update_sampling_pnt()
141 res->prop_seg = CLAMP(tseg1 / 2, min->prop_seg, max->prop_seg); in update_sampling_pnt()
142 res->phase_seg1 = tseg1 - res->prop_seg; in update_sampling_pnt()
147 res->prop_seg = tseg1 - res->phase_seg1; in update_sampling_pnt()
151 res->prop_seg = tseg1 - res->phase_seg1; in update_sampling_pnt()
155 sample_pnt_res = (CAN_SYNC_SEG + tseg1) * 1000 / total_tq; in update_sampling_pnt()