Lines Matching refs:cfg
316 static HAL_StatusTypeDef OSPIM_GetConfig(uint8_t instance_nb, OSPIM_CfgTypeDef *cfg);
1033 HAL_StatusTypeDef HAL_OSPI_HyperbusCfg(OSPI_HandleTypeDef *hospi, OSPI_HyperbusCfgTypeDef *cfg, uin… in HAL_OSPI_HyperbusCfg() argument
1040 assert_param(IS_OSPI_RW_RECOVERY_TIME(cfg->RWRecoveryTime)); in HAL_OSPI_HyperbusCfg()
1041 assert_param(IS_OSPI_ACCESS_TIME(cfg->AccessTime)); in HAL_OSPI_HyperbusCfg()
1042 assert_param(IS_OSPI_WRITE_ZERO_LATENCY(cfg->WriteZeroLatency)); in HAL_OSPI_HyperbusCfg()
1043 assert_param(IS_OSPI_LATENCY_MODE(cfg->LatencyMode)); in HAL_OSPI_HyperbusCfg()
1055 WRITE_REG(hospi->Instance->HLCR, ((cfg->RWRecoveryTime << OCTOSPI_HLCR_TRWR_Pos) | in HAL_OSPI_HyperbusCfg()
1056 (cfg->AccessTime << OCTOSPI_HLCR_TACC_Pos) | in HAL_OSPI_HyperbusCfg()
1057 cfg->WriteZeroLatency | cfg->LatencyMode)); in HAL_OSPI_HyperbusCfg()
1655 HAL_StatusTypeDef HAL_OSPI_AutoPolling(OSPI_HandleTypeDef *hospi, OSPI_AutoPollingTypeDef *cfg, uin… in HAL_OSPI_AutoPolling() argument
1666 assert_param(IS_OSPI_MATCH_MODE(cfg->MatchMode)); in HAL_OSPI_AutoPolling()
1667 assert_param(IS_OSPI_AUTOMATIC_STOP(cfg->AutomaticStop)); in HAL_OSPI_AutoPolling()
1668 assert_param(IS_OSPI_INTERVAL(cfg->Interval)); in HAL_OSPI_AutoPolling()
1672 …if ((hospi->State == HAL_OSPI_STATE_CMD_CFG) && (cfg->AutomaticStop == HAL_OSPI_AUTOMATIC_STOP_ENA… in HAL_OSPI_AutoPolling()
1680 WRITE_REG(hospi->Instance->PSMAR, cfg->Match); in HAL_OSPI_AutoPolling()
1681 WRITE_REG(hospi->Instance->PSMKR, cfg->Mask); in HAL_OSPI_AutoPolling()
1682 WRITE_REG(hospi->Instance->PIR, cfg->Interval); in HAL_OSPI_AutoPolling()
1684 (cfg->MatchMode | cfg->AutomaticStop | OSPI_FUNCTIONAL_MODE_AUTO_POLLING)); in HAL_OSPI_AutoPolling()
1733 HAL_StatusTypeDef HAL_OSPI_AutoPolling_IT(OSPI_HandleTypeDef *hospi, OSPI_AutoPollingTypeDef *cfg) in HAL_OSPI_AutoPolling_IT() argument
1744 assert_param(IS_OSPI_MATCH_MODE(cfg->MatchMode)); in HAL_OSPI_AutoPolling_IT()
1745 assert_param(IS_OSPI_AUTOMATIC_STOP(cfg->AutomaticStop)); in HAL_OSPI_AutoPolling_IT()
1746 assert_param(IS_OSPI_INTERVAL(cfg->Interval)); in HAL_OSPI_AutoPolling_IT()
1758 WRITE_REG(hospi->Instance->PSMAR, cfg->Match); in HAL_OSPI_AutoPolling_IT()
1759 WRITE_REG(hospi->Instance->PSMKR, cfg->Mask); in HAL_OSPI_AutoPolling_IT()
1760 WRITE_REG(hospi->Instance->PIR, cfg->Interval); in HAL_OSPI_AutoPolling_IT()
1762 (cfg->MatchMode | cfg->AutomaticStop | OSPI_FUNCTIONAL_MODE_AUTO_POLLING)); in HAL_OSPI_AutoPolling_IT()
1808 HAL_StatusTypeDef HAL_OSPI_MemoryMapped(OSPI_HandleTypeDef *hospi, OSPI_MemoryMappedTypeDef *cfg) in HAL_OSPI_MemoryMapped() argument
1814 assert_param(IS_OSPI_TIMEOUT_ACTIVATION(cfg->TimeOutActivation)); in HAL_OSPI_MemoryMapped()
1827 if (cfg->TimeOutActivation == HAL_OSPI_TIMEOUT_COUNTER_ENABLE) in HAL_OSPI_MemoryMapped()
1829 assert_param(IS_OSPI_TIMEOUT_PERIOD(cfg->TimeOutPeriod)); in HAL_OSPI_MemoryMapped()
1832 WRITE_REG(hospi->Instance->LPTR, cfg->TimeOutPeriod); in HAL_OSPI_MemoryMapped()
1843 (cfg->TimeOutActivation | OSPI_FUNCTIONAL_MODE_MEMORY_MAPPED)); in HAL_OSPI_MemoryMapped()
2484 HAL_StatusTypeDef HAL_OSPIM_Config(OSPI_HandleTypeDef *hospi, OSPIM_CfgTypeDef *cfg, uint32_t Timeo… in HAL_OSPIM_Config() argument
2497 assert_param(IS_OSPIM_PORT(cfg->ClkPort)); in HAL_OSPIM_Config()
2498 assert_param(IS_OSPIM_DQS_PORT(cfg->DQSPort)); in HAL_OSPIM_Config()
2499 assert_param(IS_OSPIM_PORT(cfg->NCSPort)); in HAL_OSPIM_Config()
2500 assert_param(IS_OSPIM_IO_PORT(cfg->IOLowPort)); in HAL_OSPIM_Config()
2501 assert_param(IS_OSPIM_IO_PORT(cfg->IOHighPort)); in HAL_OSPIM_Config()
2502 assert_param(IS_OSPIM_REQ2ACKTIME(cfg->Req2AckTime)); in HAL_OSPIM_Config()
2586 …if ((cfg->ClkPort == IOM_cfg[other_instance].ClkPort) || (cfg->NCSPort == IOM_cfg[other_instance].… in HAL_OSPIM_Config()
2587 ((cfg->DQSPort == IOM_cfg[other_instance].DQSPort) && (cfg->DQSPort != 0U)) || in HAL_OSPIM_Config()
2588 (cfg->IOLowPort == IOM_cfg[other_instance].IOLowPort) || in HAL_OSPIM_Config()
2589 (cfg->IOHighPort == IOM_cfg[other_instance].IOHighPort)) in HAL_OSPIM_Config()
2591 if ((cfg->ClkPort == IOM_cfg[other_instance].ClkPort) && in HAL_OSPIM_Config()
2592 (cfg->DQSPort == IOM_cfg[other_instance].DQSPort) && in HAL_OSPIM_Config()
2593 (cfg->IOLowPort == IOM_cfg[other_instance].IOLowPort) && in HAL_OSPIM_Config()
2594 (cfg->IOHighPort == IOM_cfg[other_instance].IOHighPort)) in HAL_OSPIM_Config()
2621 MODIFY_REG(OCTOSPIM->PCR[(cfg->NCSPort - 1U)], (OCTOSPIM_PCR_NCSEN | OCTOSPIM_PCR_NCSSRC), in HAL_OSPIM_Config()
2624 …if ((cfg->Req2AckTime - 1U) > ((OCTOSPIM->CR & OCTOSPIM_CR_REQ2ACK_TIME) >> OCTOSPIM_CR_REQ2ACK_TI… in HAL_OSPIM_Config()
2626 …MODIFY_REG(OCTOSPIM->CR, OCTOSPIM_CR_REQ2ACK_TIME, ((cfg->Req2AckTime - 1U) << OCTOSPIM_CR_REQ2ACK… in HAL_OSPIM_Config()
2631 …MODIFY_REG(OCTOSPIM->PCR[(cfg->ClkPort - 1U)], (OCTOSPIM_PCR_CLKEN | OCTOSPIM_PCR_CLKSRC), OCTOSPI… in HAL_OSPIM_Config()
2632 if (cfg->DQSPort != 0U) in HAL_OSPIM_Config()
2634 …MODIFY_REG(OCTOSPIM->PCR[(cfg->DQSPort - 1U)], (OCTOSPIM_PCR_DQSEN | OCTOSPIM_PCR_DQSSRC), OCTOSPI… in HAL_OSPIM_Config()
2637 if ((cfg->IOLowPort & OCTOSPIM_PCR_IOLEN) != 0U) in HAL_OSPIM_Config()
2639 MODIFY_REG(OCTOSPIM->PCR[((cfg->IOLowPort - 1U)& OSPI_IOM_PORT_MASK)], in HAL_OSPIM_Config()
2642 else if (cfg->IOLowPort != HAL_OSPIM_IOPORT_NONE) in HAL_OSPIM_Config()
2644 MODIFY_REG(OCTOSPIM->PCR[((cfg->IOLowPort - 1U)& OSPI_IOM_PORT_MASK)], in HAL_OSPIM_Config()
2652 if ((cfg->IOHighPort & OCTOSPIM_PCR_IOLEN) != 0U) in HAL_OSPIM_Config()
2654 MODIFY_REG(OCTOSPIM->PCR[((cfg->IOHighPort - 1U)& OSPI_IOM_PORT_MASK)], in HAL_OSPIM_Config()
2657 else if (cfg->IOHighPort != HAL_OSPIM_IOPORT_NONE) in HAL_OSPIM_Config()
2659 MODIFY_REG(OCTOSPIM->PCR[((cfg->IOHighPort - 1U)& OSPI_IOM_PORT_MASK)], in HAL_OSPIM_Config()
2669 MODIFY_REG(OCTOSPIM->PCR[(cfg->ClkPort - 1U)], (OCTOSPIM_PCR_CLKEN | OCTOSPIM_PCR_CLKSRC), in HAL_OSPIM_Config()
2671 if (cfg->DQSPort != 0U) in HAL_OSPIM_Config()
2673 MODIFY_REG(OCTOSPIM->PCR[(cfg->DQSPort - 1U)], (OCTOSPIM_PCR_DQSEN | OCTOSPIM_PCR_DQSSRC), in HAL_OSPIM_Config()
2677 if ((cfg->IOLowPort & OCTOSPIM_PCR_IOLEN) != 0U) in HAL_OSPIM_Config()
2679 MODIFY_REG(OCTOSPIM->PCR[((cfg->IOLowPort - 1U)& OSPI_IOM_PORT_MASK)], in HAL_OSPIM_Config()
2683 else if (cfg->IOLowPort != HAL_OSPIM_IOPORT_NONE) in HAL_OSPIM_Config()
2685 MODIFY_REG(OCTOSPIM->PCR[((cfg->IOLowPort - 1U)& OSPI_IOM_PORT_MASK)], in HAL_OSPIM_Config()
2694 if ((cfg->IOHighPort & OCTOSPIM_PCR_IOLEN) != 0U) in HAL_OSPIM_Config()
2696 MODIFY_REG(OCTOSPIM->PCR[((cfg->IOHighPort - 1U)& OSPI_IOM_PORT_MASK)], in HAL_OSPIM_Config()
2700 else if (cfg->IOHighPort != HAL_OSPIM_IOPORT_NONE) in HAL_OSPIM_Config()
2702 MODIFY_REG(OCTOSPIM->PCR[((cfg->IOHighPort - 1U)& OSPI_IOM_PORT_MASK)], in HAL_OSPIM_Config()
3095 static HAL_StatusTypeDef OSPIM_GetConfig(uint8_t instance_nb, OSPIM_CfgTypeDef *cfg) in OSPIM_GetConfig() argument
3102 if ((instance_nb == 0U) || (instance_nb > OSPI_NB_INSTANCE) || (cfg == NULL)) in OSPIM_GetConfig()
3110 cfg->ClkPort = 0U; in OSPIM_GetConfig()
3111 cfg->DQSPort = 0U; in OSPIM_GetConfig()
3112 cfg->NCSPort = 0U; in OSPIM_GetConfig()
3113 cfg->IOLowPort = 0U; in OSPIM_GetConfig()
3114 cfg->IOHighPort = 0U; in OSPIM_GetConfig()
3140 cfg->ClkPort = index + 1U; in OSPIM_GetConfig()
3150 cfg->DQSPort = index + 1U; in OSPIM_GetConfig()
3160 cfg->NCSPort = index + 1U; in OSPIM_GetConfig()
3172 cfg->IOLowPort = (OCTOSPIM_PCR_IOLEN | (index + 1U)); in OSPIM_GetConfig()
3176 cfg->IOLowPort = (OCTOSPIM_PCR_IOHEN | (index + 1U)); in OSPIM_GetConfig()
3189 cfg->IOHighPort = (OCTOSPIM_PCR_IOLEN | (index + 1U)); in OSPIM_GetConfig()
3193 cfg->IOHighPort = (OCTOSPIM_PCR_IOHEN | (index + 1U)); in OSPIM_GetConfig()