Home
last modified time | relevance | path

Searched refs:pwmCfg (Results 1 – 4 of 4) sorted by relevance

/drivers/hdf_core/adapter/platform/pwm/
Dpwm_wm.c24 pwm_init_param pwmCfg; member
38 pwm_init_param *pwmCfg = NULL; in PwmDevSetConfig() local
50 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()
Dpwm_stm32f4xx.c441 PwmConfig *pwmCfg, const PwmResource *resource) argument
448pwmCfg->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 mode
459 pwmCfg->timOcInitStruct.OCState = LL_TIM_OCSTATE_DISABLE;
460 pwmCfg->timOcInitStruct.CompareValue = arg->duty;
462 pwmCfg->timOcInitStruct.OCPolarity = LL_TIM_OCPOLARITY_HIGH;
[all …]
Dpwm_bes.c281 struct HAL_PWM_CFG_T *pwmCfg = NULL; local
293 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);
Dpwm_bes.h30 struct HAL_PWM_CFG_T pwmCfg; member