Lines Matching refs:pconfig
138 static bool MSCAN_GetSegments(uint32_t baudRate, uint32_t tqNum, mscan_timing_config_t *pconfig);
151 mscan_timing_config_t *pconfig);
236 static bool MSCAN_GetSegments(uint32_t baudRate, uint32_t tqNum, mscan_timing_config_t *pconfig) in MSCAN_GetSegments() argument
260 pconfig->timeSeg1 = (uint8_t)(p1 / IDEAL_SP_FACTOR - 1U); in MSCAN_GetSegments()
261 if ((pconfig->timeSeg1 <= MAX_TSEG1) && (pconfig->timeSeg1 >= MIN_TSEG1)) in MSCAN_GetSegments()
263 if (pconfig->timeSeg1 <= ((uint8_t)tqNum - 3U)) in MSCAN_GetSegments()
266 pconfig->timeSeg2 = (uint8_t)tqNum - (pconfig->timeSeg1 + 3U); in MSCAN_GetSegments()
268 if ((pconfig->timeSeg2 <= MAX_TSEG2) && (pconfig->timeSeg2 >= MIN_TSEG2)) in MSCAN_GetSegments()
272 pconfig->sJumpwidth = ((uint8_t)tqNum + (5U - 1U)) / 5U - 1U; in MSCAN_GetSegments()
274 if (pconfig->sJumpwidth > MAX_SJW) in MSCAN_GetSegments()
276 pconfig->sJumpwidth = MAX_SJW; in MSCAN_GetSegments()
297 mscan_timing_config_t *pconfig) in MSCAN_CalculateImprovedTimingValues() argument
321 pconfig->priDiv = (uint8_t)(sourceClock_Hz / clk - 1U); in MSCAN_CalculateImprovedTimingValues()
322 if (pconfig->priDiv > MAX_BRP) in MSCAN_CalculateImprovedTimingValues()
328 if (MSCAN_GetSegments(baudRate, tqNum, pconfig)) in MSCAN_CalculateImprovedTimingValues()