Lines Matching refs:cfg

287 static HAL_StatusTypeDef OSPIM_GetConfig(uint8_t instance_nb, OSPIM_CfgTypeDef *cfg);
1004 HAL_StatusTypeDef HAL_OSPI_HyperbusCfg(OSPI_HandleTypeDef *hospi, OSPI_HyperbusCfgTypeDef *cfg, uin… in HAL_OSPI_HyperbusCfg() argument
1011 assert_param(IS_OSPI_RW_RECOVERY_TIME(cfg->RWRecoveryTime)); in HAL_OSPI_HyperbusCfg()
1012 assert_param(IS_OSPI_ACCESS_TIME(cfg->AccessTime)); in HAL_OSPI_HyperbusCfg()
1013 assert_param(IS_OSPI_WRITE_ZERO_LATENCY(cfg->WriteZeroLatency)); in HAL_OSPI_HyperbusCfg()
1014 assert_param(IS_OSPI_LATENCY_MODE(cfg->LatencyMode)); in HAL_OSPI_HyperbusCfg()
1026 WRITE_REG(hospi->Instance->HLCR, ((cfg->RWRecoveryTime << OCTOSPI_HLCR_TRWR_Pos) | in HAL_OSPI_HyperbusCfg()
1027 (cfg->AccessTime << OCTOSPI_HLCR_TACC_Pos) | in HAL_OSPI_HyperbusCfg()
1028 cfg->WriteZeroLatency | cfg->LatencyMode)); in HAL_OSPI_HyperbusCfg()
1782 HAL_StatusTypeDef HAL_OSPI_AutoPolling(OSPI_HandleTypeDef *hospi, OSPI_AutoPollingTypeDef *cfg, uin… in HAL_OSPI_AutoPolling() argument
1793 assert_param(IS_OSPI_MATCH_MODE(cfg->MatchMode)); in HAL_OSPI_AutoPolling()
1794 assert_param(IS_OSPI_AUTOMATIC_STOP(cfg->AutomaticStop)); in HAL_OSPI_AutoPolling()
1795 assert_param(IS_OSPI_INTERVAL(cfg->Interval)); in HAL_OSPI_AutoPolling()
1799 …if ((hospi->State == HAL_OSPI_STATE_CMD_CFG) && (cfg->AutomaticStop == HAL_OSPI_AUTOMATIC_STOP_ENA… in HAL_OSPI_AutoPolling()
1807 WRITE_REG(hospi->Instance->PSMAR, cfg->Match); in HAL_OSPI_AutoPolling()
1808 WRITE_REG(hospi->Instance->PSMKR, cfg->Mask); in HAL_OSPI_AutoPolling()
1809 WRITE_REG(hospi->Instance->PIR, cfg->Interval); in HAL_OSPI_AutoPolling()
1811 (cfg->MatchMode | cfg->AutomaticStop | OSPI_FUNCTIONAL_MODE_AUTO_POLLING)); in HAL_OSPI_AutoPolling()
1860 HAL_StatusTypeDef HAL_OSPI_AutoPolling_IT(OSPI_HandleTypeDef *hospi, OSPI_AutoPollingTypeDef *cfg) in HAL_OSPI_AutoPolling_IT() argument
1871 assert_param(IS_OSPI_MATCH_MODE(cfg->MatchMode)); in HAL_OSPI_AutoPolling_IT()
1872 assert_param(IS_OSPI_AUTOMATIC_STOP(cfg->AutomaticStop)); in HAL_OSPI_AutoPolling_IT()
1873 assert_param(IS_OSPI_INTERVAL(cfg->Interval)); in HAL_OSPI_AutoPolling_IT()
1885 WRITE_REG(hospi->Instance->PSMAR, cfg->Match); in HAL_OSPI_AutoPolling_IT()
1886 WRITE_REG(hospi->Instance->PSMKR, cfg->Mask); in HAL_OSPI_AutoPolling_IT()
1887 WRITE_REG(hospi->Instance->PIR, cfg->Interval); in HAL_OSPI_AutoPolling_IT()
1889 (cfg->MatchMode | cfg->AutomaticStop | OSPI_FUNCTIONAL_MODE_AUTO_POLLING)); in HAL_OSPI_AutoPolling_IT()
1935 HAL_StatusTypeDef HAL_OSPI_MemoryMapped(OSPI_HandleTypeDef *hospi, OSPI_MemoryMappedTypeDef *cfg) in HAL_OSPI_MemoryMapped() argument
1941 assert_param(IS_OSPI_TIMEOUT_ACTIVATION(cfg->TimeOutActivation)); in HAL_OSPI_MemoryMapped()
1954 if (cfg->TimeOutActivation == HAL_OSPI_TIMEOUT_COUNTER_ENABLE) in HAL_OSPI_MemoryMapped()
1956 assert_param(IS_OSPI_TIMEOUT_PERIOD(cfg->TimeOutPeriod)); in HAL_OSPI_MemoryMapped()
1959 WRITE_REG(hospi->Instance->LPTR, cfg->TimeOutPeriod); in HAL_OSPI_MemoryMapped()
1970 (cfg->TimeOutActivation | OSPI_FUNCTIONAL_MODE_MEMORY_MAPPED)); in HAL_OSPI_MemoryMapped()
2612 HAL_StatusTypeDef HAL_OSPIM_Config(OSPI_HandleTypeDef *hospi, OSPIM_CfgTypeDef *cfg, uint32_t Timeo… in HAL_OSPIM_Config() argument
2625 assert_param(IS_OSPIM_PORT(cfg->ClkPort)); in HAL_OSPIM_Config()
2626 assert_param(IS_OSPIM_DQS_PORT(cfg->DQSPort)); in HAL_OSPIM_Config()
2627 assert_param(IS_OSPIM_PORT(cfg->NCSPort)); in HAL_OSPIM_Config()
2628 assert_param(IS_OSPIM_IO_PORT(cfg->IOLowPort)); in HAL_OSPIM_Config()
2629 assert_param(IS_OSPIM_IO_PORT(cfg->IOHighPort)); in HAL_OSPIM_Config()
2713 …if ((cfg->ClkPort == IOM_cfg[other_instance].ClkPort) || (cfg->NCSPort == IOM_cfg[other_instance].… in HAL_OSPIM_Config()
2714 ((cfg->DQSPort == IOM_cfg[other_instance].DQSPort) && (cfg->DQSPort != 0U)) || in HAL_OSPIM_Config()
2715 (cfg->IOLowPort == IOM_cfg[other_instance].IOLowPort) || in HAL_OSPIM_Config()
2716 (cfg->IOHighPort == IOM_cfg[other_instance].IOHighPort)) in HAL_OSPIM_Config()
2718 if ((cfg->ClkPort == IOM_cfg[other_instance].ClkPort) && in HAL_OSPIM_Config()
2719 (cfg->DQSPort == IOM_cfg[other_instance].DQSPort) && in HAL_OSPIM_Config()
2720 (cfg->IOLowPort == IOM_cfg[other_instance].IOLowPort) && in HAL_OSPIM_Config()
2721 (cfg->IOHighPort == IOM_cfg[other_instance].IOHighPort)) in HAL_OSPIM_Config()
2748 MODIFY_REG(OCTOSPIM->PCR[(cfg->NCSPort - 1U)], (OCTOSPIM_PCR_NCSEN | OCTOSPIM_PCR_NCSSRC), in HAL_OSPIM_Config()
2751 if (((cfg->Req2AckTime) >= 1U) && ((cfg->Req2AckTime) <= 256U)) in HAL_OSPIM_Config()
2753 …if ((cfg->Req2AckTime - 1U) > ((OCTOSPIM->CR & OCTOSPIM_CR_REQ2ACK_TIME) >> OCTOSPIM_CR_REQ2ACK_TI… in HAL_OSPIM_Config()
2755 …MODIFY_REG(OCTOSPIM->CR, OCTOSPIM_CR_REQ2ACK_TIME, ((cfg->Req2AckTime - 1U) << OCTOSPIM_CR_REQ2ACK… in HAL_OSPIM_Config()
2765 …MODIFY_REG(OCTOSPIM->PCR[(cfg->ClkPort - 1U)], (OCTOSPIM_PCR_CLKEN | OCTOSPIM_PCR_CLKSRC), OCTOSPI… in HAL_OSPIM_Config()
2766 if (cfg->DQSPort != 0U) in HAL_OSPIM_Config()
2768 …MODIFY_REG(OCTOSPIM->PCR[(cfg->DQSPort - 1U)], (OCTOSPIM_PCR_DQSEN | OCTOSPIM_PCR_DQSSRC), OCTOSPI… in HAL_OSPIM_Config()
2771 if ((cfg->IOLowPort & OCTOSPIM_PCR_IOLEN) != 0U) in HAL_OSPIM_Config()
2773 MODIFY_REG(OCTOSPIM->PCR[((cfg->IOLowPort - 1U)& OSPI_IOM_PORT_MASK)], in HAL_OSPIM_Config()
2776 else if (cfg->IOLowPort != HAL_OSPIM_IOPORT_NONE) in HAL_OSPIM_Config()
2778 MODIFY_REG(OCTOSPIM->PCR[((cfg->IOLowPort - 1U)& OSPI_IOM_PORT_MASK)], in HAL_OSPIM_Config()
2786 if ((cfg->IOHighPort & OCTOSPIM_PCR_IOLEN) != 0U) in HAL_OSPIM_Config()
2788 MODIFY_REG(OCTOSPIM->PCR[((cfg->IOHighPort - 1U)& OSPI_IOM_PORT_MASK)], in HAL_OSPIM_Config()
2791 else if (cfg->IOHighPort != HAL_OSPIM_IOPORT_NONE) in HAL_OSPIM_Config()
2793 MODIFY_REG(OCTOSPIM->PCR[((cfg->IOHighPort - 1U)& OSPI_IOM_PORT_MASK)], in HAL_OSPIM_Config()
2803 MODIFY_REG(OCTOSPIM->PCR[(cfg->ClkPort - 1U)], (OCTOSPIM_PCR_CLKEN | OCTOSPIM_PCR_CLKSRC), in HAL_OSPIM_Config()
2805 if (cfg->DQSPort != 0U) in HAL_OSPIM_Config()
2807 MODIFY_REG(OCTOSPIM->PCR[(cfg->DQSPort - 1U)], (OCTOSPIM_PCR_DQSEN | OCTOSPIM_PCR_DQSSRC), in HAL_OSPIM_Config()
2811 if ((cfg->IOLowPort & OCTOSPIM_PCR_IOLEN) != 0U) in HAL_OSPIM_Config()
2813 MODIFY_REG(OCTOSPIM->PCR[((cfg->IOLowPort - 1U)& OSPI_IOM_PORT_MASK)], in HAL_OSPIM_Config()
2817 else if (cfg->IOLowPort != HAL_OSPIM_IOPORT_NONE) in HAL_OSPIM_Config()
2819 MODIFY_REG(OCTOSPIM->PCR[((cfg->IOLowPort - 1U)& OSPI_IOM_PORT_MASK)], in HAL_OSPIM_Config()
2828 if ((cfg->IOHighPort & OCTOSPIM_PCR_IOLEN) != 0U) in HAL_OSPIM_Config()
2830 MODIFY_REG(OCTOSPIM->PCR[((cfg->IOHighPort - 1U)& OSPI_IOM_PORT_MASK)], in HAL_OSPIM_Config()
2834 else if (cfg->IOHighPort != HAL_OSPIM_IOPORT_NONE) in HAL_OSPIM_Config()
2836 MODIFY_REG(OCTOSPIM->PCR[((cfg->IOHighPort - 1U)& OSPI_IOM_PORT_MASK)], in HAL_OSPIM_Config()
3224 static HAL_StatusTypeDef OSPIM_GetConfig(uint8_t instance_nb, OSPIM_CfgTypeDef *cfg) in OSPIM_GetConfig() argument
3231 if ((instance_nb == 0U) || (instance_nb > OSPI_NB_INSTANCE) || (cfg == NULL)) in OSPIM_GetConfig()
3239 cfg->ClkPort = 0U; in OSPIM_GetConfig()
3240 cfg->DQSPort = 0U; in OSPIM_GetConfig()
3241 cfg->NCSPort = 0U; in OSPIM_GetConfig()
3242 cfg->IOLowPort = 0U; in OSPIM_GetConfig()
3243 cfg->IOHighPort = 0U; in OSPIM_GetConfig()
3269 cfg->ClkPort = index + 1U; in OSPIM_GetConfig()
3279 cfg->DQSPort = index + 1U; in OSPIM_GetConfig()
3289 cfg->NCSPort = index + 1U; in OSPIM_GetConfig()
3301 cfg->IOLowPort = (OCTOSPIM_PCR_IOLEN | (index + 1U)); in OSPIM_GetConfig()
3305 cfg->IOLowPort = (OCTOSPIM_PCR_IOHEN | (index + 1U)); in OSPIM_GetConfig()
3318 cfg->IOHighPort = (OCTOSPIM_PCR_IOLEN | (index + 1U)); in OSPIM_GetConfig()
3322 cfg->IOHighPort = (OCTOSPIM_PCR_IOHEN | (index + 1U)); in OSPIM_GetConfig()