Home
last modified time | relevance | path

Searched refs:ioctl (Results 1 – 25 of 263) sorted by relevance

1234567891011

/AliOS-Things-master/solutions/eduk1_demo/k1_apps/kws/beeper/
A Dbeeper.c21 ret = ioctl(fd, IOC_PWM_FREQ, (unsigned long)frequency); in beeper_start()
22 ret = ioctl(fd, IOC_PWM_DUTY_CYCLE, (unsigned long)&duty_cycle); in beeper_start()
23 ret = ioctl(fd, IOC_PWM_ON, (unsigned long)0); in beeper_start()
29 ret = ioctl(fd, IOC_PWM_OFF, (unsigned long)0); in beeper_start()
47 ret = ioctl(fd, IOC_PWM_FREQ, (unsigned long)freq); in beeper_stop()
48 ret = ioctl(fd, IOC_PWM_DUTY_CYCLE, (unsigned long)&duty_cycle); in beeper_stop()
49 ret = ioctl(fd, IOC_PWM_ON, (unsigned long)0); in beeper_stop()
50 ret = ioctl(fd, IOC_PWM_OFF, (unsigned long)0); in beeper_stop()
/AliOS-Things-master/components/drivers/peripheral/timer/example/
A Dtimer_example.c42 ret = ioctl(fd, IOC_TIMER_IRQP_SET, (unsigned long)&alarm); in vfs_timer_test()
44 ret = ioctl(fd, IOC_TIMER_CONTROL, (unsigned long)IO_TIMER_START); in vfs_timer_test()
48 ret = ioctl(fd, IOC_TIMER_IRQP_SET, (unsigned long)&alarm); in vfs_timer_test()
51 ret = ioctl(fd, IOC_TIMER_CONTROL, (unsigned long)IO_TIMER_STOP); in vfs_timer_test()
53 ret = ioctl(fd, IOC_TIMER_IRQP_GET, (unsigned long)&ralarm); in vfs_timer_test()
57 ret = ioctl(fd, IOC_TIMER_IRQP_SET, (unsigned long)&alarm); in vfs_timer_test()
59 ret = ioctl(fd, IOC_TIMER_CONTROL, (unsigned long)IO_TIMER_START); in vfs_timer_test()
62 ret = ioctl(fd, IOC_TIMER_RELOAD, (unsigned long)0); in vfs_timer_test()
65 ret = ioctl(fd, IOC_TIMER_CONTROL, (unsigned long)IO_TIMER_STOP); in vfs_timer_test()
67 ret = ioctl(fd, IOC_TIMER_IRQP_GET, (unsigned long)&ralarm); in vfs_timer_test()
/AliOS-Things-master/components/drivers/peripheral/timer/
A DREADME.md7 该组件是Timer VFS驱动子系统,给应用或组件提供通过VFS形式(open/close/ioctl)访问硬件Timer驱动对上层提供服务的接口。该组件初始化过程中,会根据hardware/chi…
74 int ioctl(int fd, IOC_TIMER_IRQP_SET, unsigned long arg);
82 ioctl (fd, IOC_TIMER_IRQP_SET, &ralarm);
88 int ioctl(int fd, IOC_TIMER_IRQP_GET, unsigned long arg);
92 ioctl (fd, IOC_TIMER_IRQP_GET, &alarm);
98 int ioctl(int fd, IOC_TIMER_CONTROL, unsigned long arg);
101 ioctl (fd, IOC_TIMER_CONTROL, IO_TIMER_START)
103 ioctl (fd, IOC_TIMER_CONTROL, IO_TIMER_STOP)
108 int ioctl(int fd, IOC_TIMER_RELOAD, unsigned long arg);
111 ioctl (fd, IOC_TIMER_RELOAD, true)
[all …]
/AliOS-Things-master/solutions/lora_p2p_demo/
A Dsx126x-haas.c44 ioctl(g_gpio_fd, IOC_GPIO_SET, (unsigned long)&SX126x.NSS); \
47 ioctl(g_gpio_fd, IOC_GPIO_SET, (unsigned long)&SX126x.NSS); \
68 …int ret = ioctl(SX126x.Spi, IOC_SPI_SET_CFLAG, SPI_NO_CS | SPI_MODE_3 | SPI_MSB | SPI_TRANSFER_NOR… in SX126xIoInit()
71 ret = ioctl(SX126x.Spi, IOC_SPI_SET_FREQ, 2000000); in SX126xIoInit()
93 int ret = ioctl(g_gpio_fd, IOC_GPIO_SET_IRQ, &SX126x.DIO1); in SX126xIoIrqInit()
99 ret = ioctl(g_gpio_fd, IOC_GPIO_SET_IRQ, &SX126x.DIO1); in SX126xIoIrqInit()
109 ret = ioctl(g_gpio_fd, IOC_GPIO_SET_IRQ, &SX126x.DIO1); in SX126xIoIrqInit()
152 ioctl(g_gpio_fd, IOC_GPIO_SET, (unsigned long)&SX126x.Reset); in SX126xReset()
155 ioctl(g_gpio_fd, IOC_GPIO_SET, (unsigned long)&SX126x.Reset); in SX126xReset()
168 busy = ioctl(g_gpio_fd, IOC_GPIO_GET, (unsigned long)&SX126x.BUSY); in SX126xWaitOnBusy()
[all …]
/AliOS-Things-master/solutions/eduk1_demo/k1_apps/musicbox/
A Dmusicbox.c140 ret = ioctl(fd, IOC_PWM_FREQ, (unsigned long)frequency); in tone()
141 ret = ioctl(fd, IOC_PWM_DUTY_CYCLE, (unsigned long)&duty_cycle); in tone()
142 ret = ioctl(fd, IOC_PWM_ON, (unsigned long)0); in tone()
148 ret = ioctl(fd, IOC_PWM_OFF, (unsigned long)0); in tone()
166 ret = ioctl(fd, IOC_PWM_FREQ, (unsigned long)freq); in noTone()
167 ret = ioctl(fd, IOC_PWM_DUTY_CYCLE, (unsigned long)&duty_cycle); in noTone()
168 ret = ioctl(fd, IOC_PWM_ON, (unsigned long)0); in noTone()
169 ret = ioctl(fd, IOC_PWM_OFF, (unsigned long)0); in noTone()
/AliOS-Things-master/components/drivers/peripheral/i2c/
A DREADME.md6 > I2C VFS驱动子系统,该驱动的目的是给应用或组件提供通过VFS形式(open/close/ioctl)访问I2C控制器驱动对上层提供服务的接口。
14 > I2C VFS驱动子系统内部会将open/close/ioctl请求转换成对应硬件的HAL层接口调用,通过HAL层接口控制主控芯片对I2C控制器的参数(从设备地址、CLK等)的设定或发起I2C …
74 int ioctl(int fd, IOC_I2C_SET_FREQ, unsigned long arg);
79 ioctl (fd, IOC_I2C_SET_FREQ, &c);
87 int ioctl(int fd, IOC_I2C_SET_CONFIG, unsigned long arg);
94 ioctl (fd, IOC_I2C_SET_CONFIG, &c);
103 int ioctl(int fd, int cmd, unsigned long arg);
122 |maddr | 此次内存操作要读写的memory地址,只有在ioctl cmd id为IOC_I2C_MEM_TX/IOC_I2C_MEM_RX时有效 |
123 |mlength | 此次内存操作要读写的memory的长度,只有在ioctl cmd id为IOC_I2C_MEM_TX/IOC_I2C_MEM_RX时有效 |
/AliOS-Things-master/components/amp_adapter/platform/aos/peripheral/
A Daos_hal_pwm.c42 ret = ioctl(*p_fd, IOC_PWM_FREQ, (unsigned long)pwm->config.freq); in aos_hal_pwm_init()
48 ret = ioctl(*p_fd, IOC_PWM_DUTY_CYCLE, (unsigned long)&pwm->config.duty_cycle); in aos_hal_pwm_init()
83 ret = ioctl(*p_fd, IOC_PWM_ON, NULL); in aos_hal_pwm_start()
108 ret = ioctl(*p_fd, IOC_PWM_OFF, NULL); in aos_hal_pwm_stop()
133 ret = ioctl(*p_fd, IOC_PWM_FREQ, (unsigned long)para.freq); in aos_hal_pwm_para_chg()
138 ret = ioctl(*p_fd, IOC_PWM_DUTY_CYCLE, (unsigned long)&para.duty_cycle); in aos_hal_pwm_para_chg()
A Daos_hal_i2c.c46 ret = ioctl(*p_fd, IOC_I2C_SET_CONFIG, (unsigned long)&c); in aos_hal_i2c_init()
53 ret = ioctl(*p_fd, IOC_I2C_SET_FREQ, (unsigned long)&c); in aos_hal_i2c_init()
97 ret = ioctl(*p_fd, IOC_I2C_MASTER_TX, (unsigned long)&d); in aos_hal_i2c_master_send()
129 ret = ioctl(*p_fd, IOC_I2C_MASTER_RX, (unsigned long)&d); in aos_hal_i2c_master_recv()
175 ret = ioctl(*p_fd, IOC_I2C_MEM_TX, (unsigned long)&d); in aos_hal_i2c_mem_write()
207 ret = ioctl(*p_fd, IOC_I2C_MEM_RX, (unsigned long)&d); in aos_hal_i2c_mem_read()
A Daos_hal_timer.c81 ret = ioctl(*p_fd, IOC_TIMER_IRQP_SET, (unsigned long)&alarm); in aos_hal_timer_start()
86 ret = ioctl(*p_fd, IOC_TIMER_CONTROL, (unsigned long)IO_TIMER_START); in aos_hal_timer_start()
110 ret = ioctl(*p_fd, IOC_TIMER_CONTROL, (unsigned long)IO_TIMER_STOP); in aos_hal_timer_stop()
140 ret = ioctl(*p_fd, IOC_TIMER_IRQP_SET, (unsigned long)&alarm); in aos_hal_timer_para_chg()
A Daos_hal_adc.c41 ret = ioctl(*p_fd, IOC_ADC_START, adc->config.sampling_cycle); in aos_hal_adc_init()
78 ret = ioctl(*p_fd, IOC_ADC_GET_VALUE, (unsigned long)&arg); in aos_hal_adc_value_get()
107 ret = ioctl(*p_fd, IOC_ADC_STOP, 0); in aos_hal_adc_finalize()
/AliOS-Things-master/components/py_engine/tests/extmod/
A Dwebsocket_basic.py56 print(ws.ioctl(8)) # GET_DATA_OPTS
57 print(ws.ioctl(9, 2)) # SET_DATA_OPTS
58 print(ws.ioctl(9))
60 ws.ioctl(-1)
A Dvfs_userfs.py.exp6 ioctl 4 0
11 ioctl 4 0
/AliOS-Things-master/components/drivers/peripheral/pwm/example/
A Dpwm_example.c30 ret = ioctl(fd, IOC_PWM_FREQ, (unsigned long)freq); in vfs_pwm_test()
33 ret = ioctl(fd, IOC_PWM_DUTY_CYCLE, (unsigned long)&duty_cycle); in vfs_pwm_test()
36 ret = ioctl(fd, IOC_PWM_ON, (unsigned long)0); in vfs_pwm_test()
40 ret = ioctl(fd, IOC_PWM_OFF, (unsigned long)0); in vfs_pwm_test()
/AliOS-Things-master/hardware/board/haaseduk1/drivers/
A Dkey.c97 ret = ioctl(g_gpio_fd, IOC_GPIO_GET, &config); in key_poll()
154 ret = ioctl(g_gpio_fd, IOC_GPIO_SET_IRQ, &irq_config); in key_rising_edge_handle()
160 ret = ioctl(g_gpio_fd, IOC_GPIO_SET_IRQ, &irq_config); in key_rising_edge_handle()
171 ret = ioctl(g_gpio_fd, IOC_GPIO_SET_IRQ, &irq_config); in key_rising_edge_handle()
204 ret = ioctl(g_gpio_fd, IOC_GPIO_SET_IRQ, &irq_config); in key_falling_edge_handle()
210 ret = ioctl(g_gpio_fd, IOC_GPIO_SET_IRQ, &irq_config); in key_falling_edge_handle()
223 ret = ioctl(g_gpio_fd, IOC_GPIO_SET_IRQ, &irq_config); in key_falling_edge_handle()
267 ret = ioctl(g_gpio_fd, IOC_GPIO_SET_IRQ, &irq_config); in key_init()
305 ret = ioctl(g_gpio_fd, IOC_GPIO_SET_IRQ, &irq_config); in key_init()
/AliOS-Things-master/hardware/board/haaseduk1/drivers/sensor/
A Dsensor_i2c_api.c39 ret = ioctl(*p_fd, IOC_I2C_SET_CONFIG, (unsigned long)&c); in sensor_i2c_open()
42 ret += ioctl(*p_fd, IOC_I2C_SET_FREQ, (unsigned long)&c); in sensor_i2c_open()
72 ret = ioctl(*p_fd, IOC_I2C_MASTER_TX, (unsigned long)&d); in sensor_i2c_master_send()
96 ret = ioctl(*p_fd, IOC_I2C_MASTER_RX, (unsigned long)&d); in sensor_i2c_master_recv()
121 ret = ioctl(*p_fd, IOC_I2C_MEM_TX, (unsigned long)&d); in sensor_i2c_mem_write()
146 ret = ioctl(*p_fd, IOC_I2C_MEM_RX, (unsigned long)&d); in sensor_i2c_mem_read()
/AliOS-Things-master/components/SDL2/src/audio/dsp/
A DSDL_dspaudio.c122 if (ioctl(this->hidden->audio_fd, SNDCTL_DSP_GETFMTS, &value) < 0) { in DSP_OpenDevice()
186 if ((ioctl(this->hidden->audio_fd, SNDCTL_DSP_SETFMT, &value) < 0) || in DSP_OpenDevice()
194 if (ioctl(this->hidden->audio_fd, SNDCTL_DSP_CHANNELS, &value) < 0) { in DSP_OpenDevice()
202 if (ioctl(this->hidden->audio_fd, SNDCTL_DSP_SPEED, &value) < 0) { in DSP_OpenDevice()
223 if (ioctl(this->hidden->audio_fd, SNDCTL_DSP_SETFRAGMENT, &frag_spec) < 0) { in DSP_OpenDevice()
229 ioctl(this->hidden->audio_fd, SNDCTL_DSP_GETOSPACE, &info); in DSP_OpenDevice()
282 if (ioctl(h->audio_fd, SNDCTL_DSP_GETISPACE, &info) == 0) { in DSP_FlushCapture()
/AliOS-Things-master/components/drivers/peripheral/gpio/
A DREADME.md59 int ioctl(int fd, IOC_GPIO_GET, gpio_io_config_t *config);
73 int ioctl(int fd, IOC_GPIO_SET, gpio_io_config_t *config);
97 int ioctl(int fd, IOC_GPIO_SET_IRQ, gpio_irq_config_t *config);
179 gpio read <pin ID> return <ioctl IOC_GPIO_GET返回值>
180 gpio write <pin ID> return <ioctl IOC_GPIO_SET(配置输出)返回值>
181 gpio toggle <pin ID> return <ioctl IOC_GPIO_SET(翻转输出)返回值>
/AliOS-Things-master/components/drivers/peripheral/adc/example/
A Dadc_example.c39 ret = ioctl(fd, IOC_ADC_START, sampling_cycle); in vfs_adc_test()
46 ret = ioctl(fd, IOC_ADC_GET_VALUE, (unsigned long)&adc_arg); in vfs_adc_test()
50 ret = ioctl(fd, IOC_ADC_STOP, 0); in vfs_adc_test()
/AliOS-Things-master/components/py_engine/engine/extmod/
A Dvfs_blockdev.c38 mp_load_method_maybe(bdev, MP_QSTR_ioctl, self->u.ioctl); in mp_vfs_blockdev_init()
39 if (self->u.ioctl[0] != MP_OBJ_NULL) { in mp_vfs_blockdev_init()
116 self->u.ioctl[2] = MP_OBJ_NEW_SMALL_INT(cmd); in mp_vfs_blockdev_ioctl()
117 self->u.ioctl[3] = MP_OBJ_NEW_SMALL_INT(arg); in mp_vfs_blockdev_ioctl()
118 return mp_call_method_n_kw(2, 0, self->u.ioctl); in mp_vfs_blockdev_ioctl()
A Dvirtpin.c32 return pin_p->ioctl(pin, MP_PIN_READ, 0, NULL); in mp_virtual_pin_read()
38 pin_p->ioctl(pin, MP_PIN_WRITE, value, NULL); in mp_virtual_pin_write()
/AliOS-Things-master/components/drivers/external_device/pca9544/src/
A Dpca9544_i2c_drv.c52 ret = ioctl(*p_fd, IOC_I2C_SET_CONFIG, (unsigned long)&i2c_ctrl); in pca9544_i2c_init()
59 ret = ioctl(*p_fd, IOC_I2C_SET_FREQ, (unsigned long)&i2c_ctrl); in pca9544_i2c_init()
108 ret = ioctl(*p_fd, IOC_I2C_MASTER_TX, (unsigned long)&i2c_data); in pca9544_i2c_master_send()
153 ret = ioctl(*p_fd, IOC_I2C_MASTER_RX, (unsigned long)&i2c_data); in pca9544_i2c_master_recv()
198 ret = ioctl(*p_fd, IOC_I2C_MEM_TX, (unsigned long)&i2c_data); in pca9544_i2c_mem_write()
244 ret = ioctl(*p_fd, IOC_I2C_MEM_RX, (unsigned long)&i2c_data); in pca9544_i2c_mem_read()
/AliOS-Things-master/components/drivers/peripheral/gpio/example/
A Dgpio_example.c32 ret = ioctl(fd, IOC_GPIO_GET, (unsigned long)&config); in vfs_gpio_test()
38 ret = ioctl(fd, IOC_GPIO_SET, (unsigned long)&config); in vfs_gpio_test()
43 ret = ioctl(fd, IOC_GPIO_SET, (unsigned long)&config); in vfs_gpio_test()
/AliOS-Things-master/components/a2sa/src/framework/
A Dsound_pcm.c142 if(ioctl(pcm->fd, AUDIO_PCM_IOCTL_PREPARE)) { in aos_pcm_prepare()
164 if(ioctl(pcm->fd, AUDIO_PCM_IOCTL_START)) { in aos_pcm_start()
210 if(ioctl(pcm->fd, AUDIO_PCM_IOCTL_DROP)) { in aos_pcm_stop()
232 if(ioctl(pcm->fd, AUDIO_PCM_IOCTL_DRAIN)) { in aos_pcm_drain()
252 if(ioctl(pcm->fd, AUDIO_PCM_IOCTL_PAUSE, enable)) { in aos_pcm_pause()
308 if(ioctl(pcm->fd, AUDIO_PCM_IOCTL_RECOVER)) { in aos_pcm_recover()
328 if(ioctl(pcm->fd, AUDIO_PCM_IOCTL_SUSPEND)) { in aos_pcm_suspend()
348 if(ioctl(pcm->fd, AUDIO_PCM_IOCTL_RESUME)) { in aos_pcm_resume()
540 if(ioctl(pcm->fd, AUDIO_PCM_IOCTL_WRITEI_FRAMES, &x)) { in aos_pcm_writei()
602 if(ioctl(pcm->fd, AUDIO_PCM_IOCTL_READI_FRAMES, &x)) { in aos_pcm_readi()
[all …]
A Dsound_mixer.c85 if (ioctl(fd, AUDIO_CTL_IOCTL_ELEM_LIST, &elist) < 0) { in aos_mixer_open()
92 if(ioctl(fd, AUDIO_CTL_IOCTL_CARD_INFO, &((*mixer)->card_info)) < 0) { in aos_mixer_open()
102 if (ioctl(fd, AUDIO_CTL_IOCTL_ELEM_LIST, &elist) < 0) { in aos_mixer_open()
114 if (ioctl(fd, AUDIO_CTL_IOCTL_ELEM_INFO, ei) < 0) { in aos_mixer_open()
192 if(ioctl(mixer->fd, AUDIO_CTL_IOCTL_ELEM_WRITE, &ev) < 0) { in aos_mixer_set_int_value()
220 if(ioctl(mixer->fd, AUDIO_CTL_IOCTL_ELEM_READ, &ev) < 0) { in aos_mixer_get_int_value()
/AliOS-Things-master/components/SDL2/src/core/linux/
A DSDL_evdev_kbd.c172 if (ioctl(kbd->console_fd, KDGKBENT, &kbe) < 0) { in SDL_EVDEV_kbd_load_keymaps()
188 if (ioctl(kbd->console_fd, KDGKBENT, &kbe) < 0) { in SDL_EVDEV_kbd_load_keymaps()
219 ioctl(kbd->console_fd, KDSKBMODE, kbd->old_kbd_mode); in kbd_cleanup()
359 if (ioctl(kbd->console_fd, TIOCLINUX, shift_state) == 0) { in SDL_EVDEV_kbd_init()
363 if (ioctl(kbd->console_fd, KDGKBLED, &flag_state) == 0) { in SDL_EVDEV_kbd_init()
368 if (ioctl(kbd->console_fd, KDGKBDIACR, kbd->accents) < 0) { in SDL_EVDEV_kbd_init()
373 if (ioctl(kbd->console_fd, KDGKBMODE, &kbd->old_kbd_mode) == 0) { in SDL_EVDEV_kbd_init()
375 ioctl(kbd->console_fd, KDSKBMODE, K_UNICODE); in SDL_EVDEV_kbd_init()
393 ioctl(kbd->console_fd, KDSKBMODE, K_OFF); in SDL_EVDEV_kbd_init()
424 ioctl(kbd->console_fd, KDSKBMODE, kbd->old_kbd_mode); in SDL_EVDEV_kbd_quit()
[all …]

Completed in 30 milliseconds

1234567891011