Lines Matching refs:masterConfig
278 void LPSPI_MasterInit(LPSPI_Type *base, const lpspi_master_config_t *masterConfig, uint32_t srcCloc… in LPSPI_MasterInit() argument
280 assert(masterConfig != NULL); in LPSPI_MasterInit()
300 LPSPI_SetOnePcsPolarity(base, masterConfig->whichPcs, masterConfig->pcsActiveHighOrLow); in LPSPI_MasterInit()
305 … LPSPI_CFGR1_OUTCFG(masterConfig->dataOutConfig) | LPSPI_CFGR1_PINCFG(masterConfig->pinCfg) | in LPSPI_MasterInit()
306 … LPSPI_CFGR1_NOSTALL(0) | LPSPI_CFGR1_SAMPLE((uint32_t)masterConfig->enableInputDelay); in LPSPI_MasterInit()
307 … if ((masterConfig->pinCfg == kLPSPI_SdiInSdiOut) || (masterConfig->pinCfg == kLPSPI_SdoInSdoOut)) in LPSPI_MasterInit()
312 (void)LPSPI_MasterSetBaudRate(base, masterConfig->baudRate, srcClock_Hz, &tcrPrescaleValue); in LPSPI_MasterInit()
318 base->TCR = LPSPI_TCR_CPOL(masterConfig->cpol) | LPSPI_TCR_CPHA(masterConfig->cpha) | in LPSPI_MasterInit()
319 … LPSPI_TCR_LSBF(masterConfig->direction) | LPSPI_TCR_FRAMESZ(masterConfig->bitsPerFrame - 1U) | in LPSPI_MasterInit()
320 LPSPI_TCR_PRESCALE(tcrPrescaleValue) | LPSPI_TCR_PCS(masterConfig->whichPcs); in LPSPI_MasterInit()
324 …(void)LPSPI_MasterSetDelayTimes(base, masterConfig->pcsToSckDelayInNanoSec, kLPSPI_PcsToSck, srcCl… in LPSPI_MasterInit()
325 …(void)LPSPI_MasterSetDelayTimes(base, masterConfig->lastSckToPcsDelayInNanoSec, kLPSPI_LastSckToPc… in LPSPI_MasterInit()
326 …(void)LPSPI_MasterSetDelayTimes(base, masterConfig->betweenTransferDelayInNanoSec, kLPSPI_BetweenT… in LPSPI_MasterInit()
345 void LPSPI_MasterGetDefaultConfig(lpspi_master_config_t *masterConfig) in LPSPI_MasterGetDefaultConfig() argument
347 assert(masterConfig != NULL); in LPSPI_MasterGetDefaultConfig()
350 (void)memset(masterConfig, 0, sizeof(*masterConfig)); in LPSPI_MasterGetDefaultConfig()
352 masterConfig->baudRate = 500000; in LPSPI_MasterGetDefaultConfig()
353 masterConfig->bitsPerFrame = 8; in LPSPI_MasterGetDefaultConfig()
354 masterConfig->cpol = kLPSPI_ClockPolarityActiveHigh; in LPSPI_MasterGetDefaultConfig()
355 masterConfig->cpha = kLPSPI_ClockPhaseFirstEdge; in LPSPI_MasterGetDefaultConfig()
356 masterConfig->direction = kLPSPI_MsbFirst; in LPSPI_MasterGetDefaultConfig()
358 masterConfig->pcsToSckDelayInNanoSec = (1000000000U / masterConfig->baudRate) / 2U; in LPSPI_MasterGetDefaultConfig()
359 masterConfig->lastSckToPcsDelayInNanoSec = (1000000000U / masterConfig->baudRate) / 2U; in LPSPI_MasterGetDefaultConfig()
360 masterConfig->betweenTransferDelayInNanoSec = (1000000000U / masterConfig->baudRate) / 2U; in LPSPI_MasterGetDefaultConfig()
362 masterConfig->whichPcs = kLPSPI_Pcs0; in LPSPI_MasterGetDefaultConfig()
363 masterConfig->pcsActiveHighOrLow = kLPSPI_PcsActiveLow; in LPSPI_MasterGetDefaultConfig()
365 masterConfig->pinCfg = kLPSPI_SdiInSdoOut; in LPSPI_MasterGetDefaultConfig()
366 masterConfig->dataOutConfig = kLpspiDataOutRetained; in LPSPI_MasterGetDefaultConfig()
368 masterConfig->enableInputDelay = false; in LPSPI_MasterGetDefaultConfig()