Searched refs:pwmCfg (Results 1 – 4 of 4) sorted by relevance
24 pwm_init_param pwmCfg; member38 pwm_init_param *pwmCfg = NULL; in PwmDevSetConfig() local50 pwmCfg = &prvPwm->pwmCfg; in PwmDevSetConfig()51 pwmCfg->period = config->period; in PwmDevSetConfig()52 pwmCfg->duty = config->duty; in PwmDevSetConfig()53 pwmCfg->pnum = config->number; in PwmDevSetConfig()54 pwmCfg->channel = prvPwm->resource.channel; in PwmDevSetConfig()58 tls_pwm_init(pwmCfg->channel, freq, pwmCfg->duty, pwmCfg->pnum); in PwmDevSetConfig()
441 PwmConfig *pwmCfg, const PwmResource *resource) argument448 …pwmCfg->timInitStruct.Autoreload = arg->period - 1; // if period is 1000 20KHz/1000=20Hz,period is…449 pwmCfg->timInitStruct.ClockDivision = LL_TIM_CLOCKDIVISION_DIV1;450 pwmCfg->timInitStruct.CounterMode = LL_TIM_COUNTERMODE_UP;451 pwmCfg->timInitStruct.Prescaler = resource->prescaler;452 LL_TIM_Init(g_stTimMap[arg->pwmTim], &pwmCfg->timInitStruct);458 pwmCfg->timOcInitStruct.OCMode = LL_TIM_OCMODE_PWM1; // PWM1 mode459 pwmCfg->timOcInitStruct.OCState = LL_TIM_OCSTATE_DISABLE;460 pwmCfg->timOcInitStruct.CompareValue = arg->duty;462 pwmCfg->timOcInitStruct.OCPolarity = LL_TIM_OCPOLARITY_HIGH;[all …]
281 struct HAL_PWM_CFG_T *pwmCfg = NULL; local293 pwmCfg = &prvPwm->pwmCfg;294 pwmCfg->freq = UNTIL_NAN0SECONDS / config->period;295 pwmCfg->ratio = config->duty * PERCENT / config->period;296 pwmCfg->inv = false;297 pwmCfg->sleep_on = false;302 hal_pwm_enable(pwmId, pwmCfg);
30 struct HAL_PWM_CFG_T pwmCfg; member