Home
last modified time | relevance | path

Searched refs:pconfig (Results 1 – 3 of 3) sorted by relevance

/hal_nxp-3.5.0/mcux/mcux-sdk/drivers/mcan/
Dfsl_mcan.c93 static void MCAN_GetSegments(uint32_t baudRate, uint32_t tqNum, mcan_timing_config_t *pconfig);
103 static void MCAN_FDGetSegments(uint32_t baudRateFD, uint32_t tqNum, mcan_timing_config_t *pconfig);
396 static void MCAN_FDGetSegments(uint32_t baudRateFD, uint32_t tqNum, mcan_timing_config_t *pconfig) in MCAN_FDGetSegments() argument
418 pconfig->dataseg2 = (uint8_t)(tqNum - (tqNum * ideal_sp) / (uint32_t)IDEAL_SP_FACTOR - 1U); in MCAN_FDGetSegments()
420 if (pconfig->dataseg2 > MAX_DTSEG2) in MCAN_FDGetSegments()
422 pconfig->dataseg2 = MAX_DTSEG2; in MCAN_FDGetSegments()
425 seg1Temp = tqNum - pconfig->dataseg2 - 3U; in MCAN_FDGetSegments()
429 pconfig->dataseg2 = (uint8_t)(tqNum - MAX_DTSEG1 - 3U); in MCAN_FDGetSegments()
430 pconfig->dataseg1 = MAX_DTSEG1; in MCAN_FDGetSegments()
434 pconfig->dataseg1 = (uint8_t)seg1Temp; in MCAN_FDGetSegments()
[all …]
Dfsl_mcan.h548 …ateImprovedTimingValues(uint32_t baudRate, uint32_t sourceClock_Hz, mcan_timing_config_t *pconfig);
592 mcan_timing_config_t *pconfig);
/hal_nxp-3.5.0/mcux/mcux-sdk/drivers/mscan/
Dfsl_mscan.c138 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()
[all …]