Home
last modified time | relevance | path

Searched refs:duty_cycle (Results 1 – 25 of 29) sorted by relevance

12

/AliOS-Things-master/hardware/chip/rtl872xd/hal/hal_test/pwm/
A Dpwm_test.c19 pwm_config_t testsace_config[PWM_TESTCASE_NUM] = {{.freq = 1000, .duty_cycle = 0.5f},
20 {.freq = 1000, .duty_cycle = 0.0f},
21 {.freq = 1000, .duty_cycle = 0.3f},
22 {.freq = 1000, .duty_cycle = 0.7f},
23 {.freq = 1000, .duty_cycle = 1.0f},
24 {.freq = 2000, .duty_cycle = 0.5f},
25 {.freq = 2000, .duty_cycle = 0.0f},
26 {.freq = 2000, .duty_cycle = 0.3f},
27 {.freq = 2000, .duty_cycle = 0.7f},
28 {.freq = 2000, .duty_cycle = 1.0f}};
[all …]
/AliOS-Things-master/components/py_engine/adapter/haas/
A Dmachine_pwm.c36 mp_uint_t duty_cycle; member
45 mp_uint_t oduty = self->duty_cycle; in update_param()
49 .duty_cycle = newduty / 100.f, in update_param()
60 self->duty_cycle = newduty / 100.f; in update_param()
62 self->dev.config.duty_cycle = self->duty_cycle; in update_param()
75 mp_printf(print, ", freq=%u, duty=%u)", self->freq, self->duty_cycle); in machine_pwm_print()
99 dev->config.duty_cycle = duty / 100.f; in machine_pwm_init_helper()
129 self->duty_cycle = PWDUTY / 100.f; in machine_pwm_make_new()
132 self->dev.config.duty_cycle = self->duty_cycle; in machine_pwm_make_new()
169 int status = update_param(self, freq, self->duty_cycle); in machine_pwm_freq()
[all …]
/AliOS-Things-master/components/py_engine/adapter/haas510/
A Dmachine_pwm.c59 mp_uint_t duty_cycle; member
67 mp_uint_t oduty = self->duty_cycle; in update_param()
71 .duty_cycle = newduty / 100.f, in update_param()
82 self->duty_cycle = newduty / 100.f; in update_param()
84 self->dev.config.duty_cycle = self->duty_cycle; in update_param()
96 mp_printf(print, ", freq=%u, duty=%u)", self->freq, self->duty_cycle); in machine_pwm_print()
116 dev->config.duty_cycle = duty / 100.f; in machine_pwm_init_helper()
145 self->duty_cycle = PWDUTY / 100.f; in machine_pwm_make_new()
148 self->dev.config.duty_cycle = self->duty_cycle; in machine_pwm_make_new()
182 int status = update_param(self, freq, self->duty_cycle); in machine_pwm_freq()
[all …]
/AliOS-Things-master/components/py_engine/adapter/haas600/
A Dmachine_pwm.c59 mp_uint_t duty_cycle; member
67 mp_uint_t oduty = self->duty_cycle; in update_param()
71 .duty_cycle = newduty / 100.f, in update_param()
82 self->duty_cycle = newduty / 100.f; in update_param()
84 self->dev.config.duty_cycle = self->duty_cycle; in update_param()
96 mp_printf(print, ", freq=%u, duty=%u)", self->freq, self->duty_cycle); in machine_pwm_print()
116 dev->config.duty_cycle = duty / 100.f; in machine_pwm_init_helper()
145 self->duty_cycle = PWDUTY / 100.f; in machine_pwm_make_new()
148 self->dev.config.duty_cycle = self->duty_cycle; in machine_pwm_make_new()
182 int status = update_param(self, freq, self->duty_cycle); in machine_pwm_freq()
[all …]
/AliOS-Things-master/components/drivers/peripheral/pwm/src/
A Dpwm.c51 if (l_attr.duty_cycle > l_attr.period) { in aos_pwm_set_attr()
53 l_attr.duty_cycle = l_attr.period; in aos_pwm_set_attr()
56 l_attr.duty_cycle == pwm->duty_cycle && in aos_pwm_set_attr()
67 pwm->duty_cycle = l_attr.duty_cycle; in aos_pwm_set_attr()
85 attr->duty_cycle = pwm->duty_cycle; in aos_pwm_get_attr()
116 pwm->duty_cycle = 0; in dev_pwm_put()
142 pwm->duty_cycle = 0; in aos_pwm_register()
A Dpwm_csi.c31 uint32_t duty_cycle; in pwm_csi_apply() local
35 duty_cycle = attr->duty_cycle / 1000; in pwm_csi_apply()
37 period, duty_cycle, (csi_pwm_polarity_t)attr->polarity); in pwm_csi_apply()
/AliOS-Things-master/components/drivers/peripheral/pwm/example/
A Daos_pwm_example.c26 uint32_t channel, period, duty_cycle, polarity, enabled, duration; in aos_pwm_cli_cmd() local
36 duty_cycle = strtoul(argv[3], NULL, 0); in aos_pwm_cli_cmd()
46 attr.duty_cycle = duty_cycle; in aos_pwm_cli_cmd()
61 printf("duty_cycle %u ns\r\n", attr.duty_cycle); in aos_pwm_cli_cmd()
A Dpwm_example.c19 float duty_cycle = 0.5; in vfs_pwm_test() local
33 ret = ioctl(fd, IOC_PWM_DUTY_CYCLE, (unsigned long)&duty_cycle); in vfs_pwm_test()
34 … printf("set pwm's duty cycle to %f %s, ret:%d\r\n", duty_cycle, ret ? "fail" : "succeed", ret); in vfs_pwm_test()
/AliOS-Things-master/solutions/eduk1_demo/k1_apps/kws/beeper/
A Dbeeper.c15 float duty_cycle = 0.8; in beeper_start() local
22 ret = ioctl(fd, IOC_PWM_DUTY_CYCLE, (unsigned long)&duty_cycle); in beeper_start()
40 float duty_cycle = 0.8; in beeper_stop() local
48 ret = ioctl(fd, IOC_PWM_DUTY_CYCLE, (unsigned long)&duty_cycle); in beeper_stop()
/AliOS-Things-master/components/amp_adapter/platform/aos/peripheral/
A Daos_hal_pwm.c48 ret = ioctl(*p_fd, IOC_PWM_DUTY_CYCLE, (unsigned long)&pwm->config.duty_cycle); in aos_hal_pwm_init()
50 printf ("set duty cycle to %d on %s failed, ret:%d\r\n", pwm->config.duty_cycle, name, ret); in aos_hal_pwm_init()
138 ret = ioctl(*p_fd, IOC_PWM_DUTY_CYCLE, (unsigned long)&para.duty_cycle); in aos_hal_pwm_para_chg()
140 … printf ("set duty cycle to %d on pwm%d failed, ret:%d\r\n", para.duty_cycle, pwm->port, ret); in aos_hal_pwm_para_chg()
/AliOS-Things-master/hardware/chip/haas1000/aos_driver/pwm/
A Dpwm.c102 uint32_t duty_cycle; in haas1000_pwm_apply() local
106 duty_cycle = attr->duty_cycle; in haas1000_pwm_apply()
108 period, duty_cycle, attr->polarity); in haas1000_pwm_apply()
/AliOS-Things-master/components/amp_adapter/platform/linux/peripheral/
A Daos_hal_pwm.c13 printf ("[%s] duty_cycle = %d \r\n", __FUNCTION__, pwm->config.duty_cycle); in aos_hal_pwm_init()
36 printf ("[%s] duty_cycle = %d \r\n", __FUNCTION__, para.duty_cycle); in aos_hal_pwm_para_chg()
/AliOS-Things-master/components/amp/engine/quickjs_engine/addons/hardware/pwm/
A Dmodule_pwm.c57 pwm_device->config.duty_cycle); in native_pwm_open()
125 pwm_config.duty = (int)(pwm_device->config.duty_cycle * 100); in native_pwm_getConfig()
194 pwm_device->config.duty_cycle = (float)duty / 100.0; in native_pwm_setConfig()
204 para.duty_cycle = pwm_device->config.duty_cycle; in native_pwm_setConfig()
/AliOS-Things-master/solutions/eduk1_demo/k1_apps/musicbox/
A Dmusicbox.c134 float duty_cycle = 0.8; in tone() local
141 ret = ioctl(fd, IOC_PWM_DUTY_CYCLE, (unsigned long)&duty_cycle); in tone()
159 float duty_cycle = 0.8; in noTone() local
167 ret = ioctl(fd, IOC_PWM_DUTY_CYCLE, (unsigned long)&duty_cycle); in noTone()
/AliOS-Things-master/hardware/board/haaseduk1/board_test/
A Dpwm_test.c35 para.duty_cycle = 0.1 * i; in pwm_test_process()
40 para.duty_cycle = 0.01 * i; in pwm_test_process()
/AliOS-Things-master/hardware/chip/haas1000/drivers/services/ble_stack/dbg/api/
A Ddbg_mwsgen.h91 void dbg_mwsgen_config(uint32_t period, uint32_t duty_cycle, uint32_t tx_act, uint32_t rx_act);
159 void dbg_wlangen_config(uint32_t period, uint32_t duty_cycle, uint32_t tx_act, uint32_t rx_act);
/AliOS-Things-master/hardware/chip/rtl872xd/aos_driver/pwm/
A Dpwm.c187 uint32_t duty_cycle; in rtl872xd_pwm_apply() local
191 duty_cycle = attr->duty_cycle; in rtl872xd_pwm_apply()
193 period, duty_cycle, attr->polarity); in rtl872xd_pwm_apply()
/AliOS-Things-master/hardware/chip/rtl872xd/hal/
A Dpwm.c57 pwmout_write(pwm->priv , pwm->config.duty_cycle); in hal_pwm_init()
105 pwmout_write(pwm->priv, para.duty_cycle); in hal_pwm_para_chg()
/AliOS-Things-master/components/py_engine/modules/driver/
A Dpwm.c157 pwm_device->config.duty_cycle = (float)mp_obj_get_int(mp_obj_dict_get(args[1], index)) / 100.0; in obj_setOption()
170 para.duty_cycle = pwm_device->config.duty_cycle; in obj_setOption()
214 mp_obj_new_int((int)(pwm_device->config.duty_cycle * 100))); in obj_getOption()
/AliOS-Things-master/components/amp/engine/duktape_engine/addons/hardware/pwm/
A Dmodule_pwm.c46 pwm_device->config.duty_cycle); in native_pwm_open()
104 pwm_config.duty = (int)(pwm_device->config.duty_cycle * 100); in native_pwm_getConfig()
147 pwm_device->config.duty_cycle = (float)duty / 100.0; in native_pwm_setConfig()
/AliOS-Things-master/components/amp_adapter/include/peripheral/
A Daos_hal_pwm.h22 float duty_cycle; /**< the pwm duty_cycle */ member
/AliOS-Things-master/components/drivers/peripheral/pwm/include/aos/hal/
A Dpwm.h22 float duty_cycle; /**< the pwm duty_cycle */ member
/AliOS-Things-master/components/drivers/peripheral/pwm/include/aos/
A Dpwm.h31 uint32_t duty_cycle; /*in ns*/ member
A Dpwm_core.h35 uint32_t duty_cycle; /**< PWM设备占空比(单位:ns) */ member
/AliOS-Things-master/components/py_engine/tests/wipy/
A Dtimer.py32 ch = tim.channel(Timer.A, freq=50000, duty_cycle=2000, polarity=Timer.POSITIVE)
34 ch = tim.channel(Timer.B, freq=50000, duty_cycle=8000, polarity=Timer.NEGATIVE)

Completed in 28 milliseconds

12