Lines Matching refs:masterConfig
426 void LPI2C_MasterGetDefaultConfig(lpi2c_master_config_t *masterConfig) in LPI2C_MasterGetDefaultConfig() argument
429 (void)memset(masterConfig, 0, sizeof(*masterConfig)); in LPI2C_MasterGetDefaultConfig()
431 masterConfig->enableMaster = true; in LPI2C_MasterGetDefaultConfig()
432 masterConfig->debugEnable = false; in LPI2C_MasterGetDefaultConfig()
433 masterConfig->enableDoze = true; in LPI2C_MasterGetDefaultConfig()
434 masterConfig->ignoreAck = false; in LPI2C_MasterGetDefaultConfig()
435 masterConfig->pinConfig = kLPI2C_2PinOpenDrain; in LPI2C_MasterGetDefaultConfig()
436 masterConfig->baudRate_Hz = 100000U; in LPI2C_MasterGetDefaultConfig()
437 masterConfig->busIdleTimeout_ns = 0U; /* Set to 0 to disable the function */ in LPI2C_MasterGetDefaultConfig()
438 masterConfig->pinLowTimeout_ns = 0U; /* Set to 0 to disable the function */ in LPI2C_MasterGetDefaultConfig()
439 masterConfig->sdaGlitchFilterWidth_ns = 0U; /* Set to 0 to disable the function */ in LPI2C_MasterGetDefaultConfig()
440 masterConfig->sclGlitchFilterWidth_ns = 0U; /* Set to 0 to disable the function */ in LPI2C_MasterGetDefaultConfig()
441 masterConfig->hostRequest.enable = false; in LPI2C_MasterGetDefaultConfig()
442 masterConfig->hostRequest.source = kLPI2C_HostRequestExternalPin; in LPI2C_MasterGetDefaultConfig()
443 masterConfig->hostRequest.polarity = kLPI2C_HostRequestPinActiveHigh; in LPI2C_MasterGetDefaultConfig()
459 void LPI2C_MasterInit(LPI2C_Type *base, const lpi2c_master_config_t *masterConfig, uint32_t sourceC… in LPI2C_MasterInit() argument
483 …base->MCR = LPI2C_MCR_DBGEN(masterConfig->debugEnable) | LPI2C_MCR_DOZEN(!(masterConfig->enableDoz… in LPI2C_MasterInit()
488 value |= LPI2C_MCFGR0_HREN(masterConfig->hostRequest.enable) | in LPI2C_MasterInit()
489 LPI2C_MCFGR0_HRPOL(masterConfig->hostRequest.polarity) | in LPI2C_MasterInit()
490 LPI2C_MCFGR0_HRSEL(masterConfig->hostRequest.source); in LPI2C_MasterInit()
496 value |= LPI2C_MCFGR1_PINCFG(masterConfig->pinConfig); in LPI2C_MasterInit()
497 value |= LPI2C_MCFGR1_IGNACK(masterConfig->ignoreAck); in LPI2C_MasterInit()
504 if (0U != (masterConfig->sdaGlitchFilterWidth_ns)) in LPI2C_MasterInit()
508 cycles = LPI2C_GetCyclesForWidth(sourceClock_Hz, masterConfig->sdaGlitchFilterWidth_ns, 1U, in LPI2C_MasterInit()
513 if (0U != masterConfig->sclGlitchFilterWidth_ns) in LPI2C_MasterInit()
517 cycles = LPI2C_GetCyclesForWidth(sourceClock_Hz, masterConfig->sclGlitchFilterWidth_ns, 1U, in LPI2C_MasterInit()
526 LPI2C_MasterSetBaudRate(base, sourceClock_Hz, masterConfig->baudRate_Hz); in LPI2C_MasterInit()
532 if (0U != (masterConfig->busIdleTimeout_ns)) in LPI2C_MasterInit()
536 cycles = LPI2C_GetCyclesForWidth(sourceClock_Hz, masterConfig->busIdleTimeout_ns, 1U, in LPI2C_MasterInit()
540 if (0U != masterConfig->pinLowTimeout_ns) in LPI2C_MasterInit()
544 … cycles = LPI2C_GetCyclesForWidth(sourceClock_Hz, masterConfig->pinLowTimeout_ns / 256U, 1U, in LPI2C_MasterInit()
549 LPI2C_MasterEnable(base, masterConfig->enableMaster); in LPI2C_MasterInit()