/AliOS-Things-master/components/drivers/peripheral/wifi/src/ |
A D | wifi.c | 20 if(dev && WIFI_DRIVER(dev) && WIFI_DRIVER(dev)->init) { in hal_wifi_init() 22 ret = WIFI_DRIVER(dev)->init(dev); in hal_wifi_init() 32 if(dev && WIFI_DRIVER(dev) && WIFI_DRIVER(dev)->deinit) { in hal_wifi_deinit() 41 if(dev&& WIFI_DRIVER(dev)) { in hal_wifi_get_base_info() 88 if(dev && WIFI_DRIVER(dev) && WIFI_DRIVER(dev)->set_mode) { in hal_wifi_set_mode() 100 if(dev && WIFI_DRIVER(dev) && WIFI_DRIVER(dev)->get_mode) { in hal_wifi_get_mode() 134 if(dev && WIFI_DRIVER(dev) && WIFI_DRIVER(dev)->set_mac_addr) { in hal_wifi_set_mac_addr() 156 if(dev && WIFI_DRIVER(dev) && WIFI_DRIVER(dev)->set_lpm) { in hal_wifi_set_lpm() 167 if(dev && WIFI_DRIVER(dev) && WIFI_DRIVER(dev)->get_lpm) { in hal_wifi_get_lpm() 189 if(dev && WIFI_DRIVER(dev) && WIFI_DRIVER(dev)->start_scan) { in hal_wifi_start_scan() [all …]
|
A D | wifi_inter.h | 17 int hal_wifi_init(netdev_t *dev); 18 int hal_wifi_deinit(netdev_t *dev); 20 int hal_wifi_set_mode(netdev_t *dev, wifi_mode_t mode); 21 int hal_wifi_get_mode(netdev_t *dev, wifi_mode_t *mode); 23 int hal_wifi_get_mac_addr(netdev_t *dev, uint8_t *mac); 26 int hal_wifi_set_channel(netdev_t *dev, int channel); 29 int hal_wifi_stop_monitor(netdev_t *dev); 36 int hal_wifi_disconnect(netdev_t *dev); 37 int hal_wifi_cancel_connect(netdev_t *dev); 41 int hal_wifi_start_mgnt_monitor(netdev_t *dev); [all …]
|
/AliOS-Things-master/components/drivers/core/base/src/ |
A D | device.c | 62 int r = compare_device(type, id, dev->type, dev->id); in find_device() 112 return aos_register_driver(path, dev->vfs_helper.ops, dev); in add_to_vfs() 134 if (!dev) in aos_dev_register() 150 if (find_device(dev->type, dev->id)) { in aos_dev_register() 186 if (!dev) { in aos_dev_unregister() 219 if (dev->ops && dev->ops->unregister) in aos_dev_unregister() 220 dev->ops->unregister(dev); in aos_dev_unregister() 230 if (!dev) { in aos_dev_ref() 247 ref->dev = dev; in aos_dev_ref() 250 if (dev->ops && dev->ops->get) { in aos_dev_ref() [all …]
|
/AliOS-Things-master/components/drivers/core/base/device/ |
A D | device.c | 16 #define device_init (dev->init) 17 #define device_open (dev->open) 146 if (dev == NULL) 153 dev->flag = flags; 154 dev->ref_count = 0; 155 dev->open_flag = 0; 180 DEV_ASSERT(dev != NULL); 272 DEV_ASSERT(dev != NULL); 279 aos_free(dev); 367 dev->ref_count++; [all …]
|
A D | vfs_adapter.c | 13 aos_device_t dev = NULL; in _device_open() local 23 dev = fp->node->i_arg; in _device_open() 25 if (NULL == dev) { in _device_open() 34 aos_device_t dev = NULL; in _device_close() local 44 dev = fp->node->i_arg; in _device_close() 46 if (NULL == dev) { in _device_close() 67 dev = fp->node->i_arg; in _device_read() 69 if (NULL == dev) { in _device_read() 97 if (NULL == dev) { in _device_write() 123 if (NULL == dev) { in _device_ioctl() [all …]
|
/AliOS-Things-master/components/drivers/core/base/core/ |
A D | u_bus.c | 80 dev = dev_p->dev; in u_bus_dump() 126 if (!dev) { in u_bus_del_device() 134 if (dev && dev->drv) { in u_bus_del_device() 140 if (dev && dev->bus && !dlist_empty(&dev->bus->p->dev_list)) { in u_bus_del_device() 209 r = dev->bus->init(dev); in u_driver_init_device() 218 r = dev->bus->probe(dev); in u_driver_init_device() 345 dev = dev_p->dev; in u_bus_attach_driver() 505 dev = dev_p->dev; 581 r = dev->bus->deinit(dev); in u_driver_deinit_device() 591 r = dev->bus->remove(dev); in u_driver_deinit_device() [all …]
|
A D | u_cdev.c | 27 cdev_info("dev[%p] dev_id[%x] count[%d], ops[%p]\r\n", dev, dev->dev_id, dev->count, dev->ops); in u_cdev_dump() 54 if (!dev || !fops) { in u_cdev_init() 61 if (dev->ops) { in u_cdev_init() 71 dev->ops = fops; in u_cdev_init() 72 dev->thread_ctx = NULL; in u_cdev_init() 75 cdev_dbg("dev:%p init done, id:%d, fops:%p\r\n", dev, dev->dev_id, fops); in u_cdev_init() 92 dev->dev_id = devid; in u_cdev_add() 93 dev->count = count; in u_cdev_add() 95 u_cdev_dump(dev); in u_cdev_add() 182 if (!dev) { in u_cdev_del() [all …]
|
A D | u_device.c | 41 if (!dev) { in u_device_dump() 47 dev, dev->name, in u_device_dump() 48 dev->id, dev->dev_id, in u_device_dump() 49 dev->parent, dev->bus, dev->drv, dev->driver_data); in u_device_dump() 81 p->dev = dev; in u_device_initialize() 82 dev->p = p; in u_device_initialize() 103 if (!dev || !dev->p || !dev->bus) { in u_device_add() 104 …ddkc_err("invalid dev:%p or dev->p:%p or dev->bus:%p\r\n", dev, dev ? dev->p : NULL, dev ? dev->bu… in u_device_add() 108 if (!dev->bus->name || (dev->id >= MAX_DEV_ID_NUM)){ in u_device_add() 113 p = dev->p; in u_device_add() [all …]
|
/AliOS-Things-master/components/SDL2/src/hidapi/mac/ |
A D | hid.c | 154 return dev; in new_hid_device() 159 if (!dev) in free_hid_device() 181 if (device_list->dev == dev) { in free_hid_device() 187 if (node->next && node->next->dev == dev) { in free_hid_device() 206 free(dev); in free_hid_device() 767 node->dev = dev; in hid_open_path() 877 if (dev->shutdown_thread || dev->disconnected) in cond_wait() 897 if (dev->shutdown_thread || dev->disconnected) in cond_timedwait() 938 res = cond_wait(dev, &dev->condition, &dev->mutex); in hid_read_timeout() 960 res = cond_timedwait(dev, &dev->condition, &dev->mutex, &ts); in hid_read_timeout() [all …]
|
/AliOS-Things-master/components/amp/components/at/src/ |
A D | at.c | 78 at_dev_t *dev = NULL; in at_scan_for_callback() local 155 at_dev_t *dev = NULL; in at_getc() local 501 dev->_inited = 1; in at_worker() 552 dev->_inited = 0; in stop_at_worker() 654 at_dev_t *dev; in deinit_dev() local 779 dev->_recv_prefix_len = strlen(dev->_default_recv_prefix); in init_dev() 781 dev->_recv_fail_postfix_len = strlen(dev->_default_recv_fail_postfix); in init_dev() 815 dev->_inited = 1; in init_dev() 996 if ((ret = op->send(dev->_dev, (void *)dev->_send_delimiter, in at_send_no_reply() 1183 if ((ret = op->send(dev->_dev, (void *)dev->_send_delimiter, in at_send_wait_reply() [all …]
|
/AliOS-Things-master/components/drivers/peripheral/wifi/include/aos/hal/ |
A D | wifi.h | 34 int (*init)(netdev_t *dev); 35 int (*deinit)(netdev_t *dev); 36 int (*set_mode)(netdev_t *dev, wifi_mode_t mode); 39 int (*cancel_connect)(netdev_t *dev); 52 int (*disconnect)(netdev_t *dev);//stop ap or sta 59 int (*stop_monitor)(netdev_t *dev); 61 int (*set_channel)(netdev_t *dev, int channel); 62 int (*get_channel)(netdev_t *dev, int *channel); 65 int (*start_mgnt_monitor)(netdev_t *dev); 66 int (*stop_mgnt_monitor)(netdev_t *dev); [all …]
|
/AliOS-Things-master/components/drivers/core/base/platform/ |
A D | u_platform_bus.c | 68 ret = drv->init(dev); in u_platform_bus_init() 168 if (dev->dev.bus && dev->dev.bus != &u_platform_bus) { in u_platform_device_register() 170 dev->dev.bus, dev->dev.bus->name, &u_platform_bus); in u_platform_device_register() 173 dev->dev.bus = &u_platform_bus; in u_platform_device_register() 175 if (!dev->dev.parent && dev != &u_platform_root_dev) in u_platform_device_register() 176 dev->dev.parent = &u_platform_root_dev.dev; in u_platform_device_register() 178 dev->dev.name = (char *)dev->name; in u_platform_device_register() 179 r = u_device_register(&dev->dev); in u_platform_device_register() 235 if (!dev) in u_platform_device_unregister() 237 u_bus_del_device(&dev->dev); in u_platform_device_unregister() [all …]
|
/AliOS-Things-master/components/SDL2/src/hidapi/libusb/ |
A D | hid.c | 175 dev->blocking = 1; in new_hid_device() 181 return dev; in new_hid_device() 192 free(dev); in free_hid_device() 868 dev, in read_thread() 1077 dev->thread = SDL_CreateThread(read_thread, NULL, dev); in hid_open_path() 1095 return dev; in hid_open_path() 1207 while (!dev->input_reports && !dev->shutdown_thread) { in hid_read_timeout() 1208 SDL_CondWait(dev->condition, dev->mutex); in hid_read_timeout() 1218 while (!dev->input_reports && !dev->shutdown_thread) { in hid_read_timeout() 1332 if (!dev) in hid_close() [all …]
|
/AliOS-Things-master/components/a2sa/internal/driver/core/ |
A D | pcm_dev.h | 17 int (*open)(void *dev); 20 int (*hw_prepare)(void *dev); 21 int (*start)(void *dev); 26 int (*drain)(void *dev); 27 int (*pause)(void *dev, int enable); 28 int (*stop)(void *dev); 29 int (*close)(void *dev); 30 int (*recover)(void *dev); 31 int (*suspend)(void *dev); 32 int (*resume)(void *dev); [all …]
|
/AliOS-Things-master/components/drivers/core/base/include/device/ |
A D | aos_device.h | 115 int (*init) (aos_device_t dev); 117 int (*close) (aos_device_t dev); 137 long (*init) (aos_device_t dev); 139 long (*close) (aos_device_t dev); 155 int aos_device_register(aos_device_t dev, 166 int aos_device_unregister(aos_device_t dev); 192 void aos_device_destroy(aos_device_t dev); 201 int aos_device_init(aos_device_t dev); 220 int aos_device_close(aos_device_t dev); 234 size_t aos_device_read(aos_device_t dev, [all …]
|
/AliOS-Things-master/components/a2sa/src/driver/core/ |
A D | pcm_dev.c | 15 pcm_device_t *dev = NULL; in audio_pcm_device_new() local 27 if(!dev) { in audio_pcm_device_new() 31 dev->dirType = dirType; in audio_pcm_device_new() 33 if(!dev->name) { in audio_pcm_device_new() 35 free(dev); in audio_pcm_device_new() 38 dev->ops = ops; in audio_pcm_device_new() 42 return dev; in audio_pcm_device_new() 47 if(!dev) { in audio_pcm_device_free() 52 free(dev->name); in audio_pcm_device_free() 53 free(dev); in audio_pcm_device_free() [all …]
|
A D | control_dev.c | 13 ctrl_device_t *dev = NULL; in audio_ctrl_device_new() local 15 if(!dev) { in audio_ctrl_device_new() 20 memset(dev, 0, sizeof(ctrl_device_t)); in audio_ctrl_device_new() 21 dev->id = id; in audio_ctrl_device_new() 22 snprintf(dev->name, sizeof(dev->name), "/dev/controlC%d", id); in audio_ctrl_device_new() 23 dlist_init(&dev->kcontrol_list); in audio_ctrl_device_new() 25 return dev; in audio_ctrl_device_new() 30 if(!dev) { in audio_ctrl_device_free() 34 dev->parent_data = NULL; in audio_ctrl_device_free() 35 free(dev); in audio_ctrl_device_free() [all …]
|
/AliOS-Things-master/components/SDL2/src/hidapi/windows/ |
A D | hid.c | 192 memset(&dev->ol, 0, sizeof(dev->ol)); in new_hid_device() 194 memset(&dev->write_ol, 0, sizeof(dev->write_ol)); in new_hid_device() 197 return dev; in new_hid_device() 207 free(dev); in free_hid_device() 646 hid_device *dev; in hid_open_path() local 690 dev->read_buf = (char*) malloc(dev->input_report_length); in hid_open_path() 692 return dev; in hid_open_path() 794 memset(dev->read_buf, 0, dev->input_report_length); in hid_read_timeout() 796 …res = ReadFile(dev->device_handle, dev->read_buf, (DWORD)dev->input_report_length, &bytes_read, &d… in hid_read_timeout() 855 return hid_read_timeout(dev, data, length, (dev->blocking)? -1: 0); in hid_read() [all …]
|
/AliOS-Things-master/components/py_engine/adapter/haas/ |
A D | machine_hw_i2c.c | 45 i2c_dev_t dev; member 54 i2c_dev_t *dev = &self->dev; in mp_machine_hw_i2c_init() local 65 i2c_dev_t *dev = &self->dev; in mp_machine_hw_i2c_deinit() local 73 i2c_dev_t *dev = &self->dev; in mp_machine_hw_i2c_transfer() local 104 i2c_dev_t *dev = &self->dev; in mp_machine_hw_i2c_write() local 125 i2c_dev_t *dev = &self->dev; in mp_machine_hw_i2c_read() local 149 i2c_dev_t *dev = &self->dev; in machine_hw_i2c_print() local 154 …self->port, self->scl, self->sda, dev->config.freq, dev->config.address_width, dev->config.dev_add… in machine_hw_i2c_print() 160 i2c_dev_t *dev = &self->dev; in machine_hw_i2c_init() local 250 i2c_dev_t *dev = &self->dev; in machine_hw_i2c_make_new() local [all …]
|
A D | machine_hw_spi.c | 39 spi_dev_t dev; member 49 spi_dev_t *dev = &self->dev; in machine_hw_spi_deinit_internal() local 50 aos_hal_spi_finalize(dev); in machine_hw_spi_deinit_internal() 56 spi_dev_t *dev = &self->dev; in machine_hw_spi_init_internal() local 80 spi_dev_t *dev = &self->dev; in machine_hw_spi_deinit() local 91 spi_dev_t *dev = &self->dev; in machine_hw_spi_transfer() local 121 spi_dev_t *dev = &self->dev; in machine_hw_spi_print() local 134 spi_dev_t *dev = &self->dev; in machine_hw_spi_init() local 220 spi_dev_t *dev = &self->dev; in machine_hw_spi_make_new() local 221 dev->port = port; in machine_hw_spi_make_new() [all …]
|
/AliOS-Things-master/components/drivers/peripheral/adc/src/ |
A D | adc.c | 41 adc = aos_container_of(ref->dev, aos_adc_t, dev); in aos_adc_set_sample_time() 45 aos_dev_lock(ref->dev); in aos_adc_set_sample_time() 58 adc = aos_container_of(ref->dev, aos_adc_t, dev); in aos_adc_set_mode() 62 aos_dev_lock(ref->dev); in aos_adc_set_mode() 75 adc = aos_container_of(ref->dev, aos_adc_t, dev); in aos_adc_get_resolution() 90 adc = aos_container_of(ref->dev, aos_adc_t, dev); in aos_adc_get_range() 109 adc = aos_container_of(ref->dev, aos_adc_t, dev); in aos_adc_read() 126 adc = aos_container_of(ref->dev, aos_adc_t, dev); in aos_adc_read_voltage() 137 aos_adc_t *adc = aos_container_of(dev, aos_adc_t, dev); in dev_adc_unregister() 145 aos_adc_t *adc = aos_container_of(ref->dev, aos_adc_t, dev); in dev_adc_get() [all …]
|
/AliOS-Things-master/components/ucamera/src/device/wifi/ |
A D | wifi_camera.c | 26 free(dev); in wifi_camera_delete() 34 int32_t wifi_camera_init(ucamera_device_t *dev) in wifi_camera_init() argument 50 int32_t wifi_camera_uninit(ucamera_device_t *dev) in wifi_camera_uninit() argument 74 if (!dev) in wifi_camera_disconnect() 85 if (!dev) in wifi_camera_get_frame() 98 dev->stream_buf = NULL; in wifi_camera_get_frame() 99 dev->stream_len = 0; in wifi_camera_get_frame() 107 dev->frame.buf = dev->stream_buf; in wifi_camera_get_frame() 108 dev->frame.len = dev->stream_len; in wifi_camera_get_frame() 111 dev->frame.format = FRAME_FORMAT_RGB565; in wifi_camera_get_frame() [all …]
|
/AliOS-Things-master/components/netmgr/src/ |
A D | netmgr_nbiot.c | 21 return hal_nbiot_start(node->dev); in netmgr_nbiot_provision() 27 aos_dev_t *dev = node->dev; in netmgr_nbiot_unprovision() local 29 hal_net_set_link_down(dev); in netmgr_nbiot_unprovision() 30 device_close(dev); in netmgr_nbiot_unprovision() 39 aos_dev_t *dev = node->dev; in netmgr_nbiot_info() local 40 netdev_driver_t *drv = dev->drv; in netmgr_nbiot_info() 52 nbiot_drv->get_csq(dev, &csq); in netmgr_nbiot_info() 80 aos_dev_t *dev = node->dev; in netmgr_nbiot_service() local 103 aos_dev_t *dev = node->dev; in netmgr_nbiot_reset() local 104 netdev_driver_t *drv = dev->drv; in netmgr_nbiot_reset() [all …]
|
/AliOS-Things-master/hardware/chip/rtl872xd/csi_driver/gpio/ |
A D | gpio.c | 31 gpio->dev.idx = port_idx; in csi_gpio_init() 40 if (gpio->dev.idx != PORT_A && gpio->dev.idx != PORT_B) { in csi_gpio_uninit() 54 if (gpio->dev.idx != PORT_A && gpio->dev.idx != PORT_B) { in csi_gpio_dir() 76 if (gpio->dev.idx != PORT_A && gpio->dev.idx != PORT_B) { in csi_gpio_mode() 113 if (gpio->dev.idx != PORT_A && gpio->dev.idx != PORT_B) { in csi_gpio_irq_mode() 121 if(gpio->dev.idx == PORT_A) { in csi_gpio_irq_mode() 173 if (gpio->dev.idx != PORT_A && gpio->dev.idx != PORT_B) { in csi_gpio_irq_enable() 190 if (gpio->dev.idx != PORT_A && gpio->dev.idx != PORT_B) { in csi_gpio_write() 206 if (gpio->dev.idx != PORT_A && gpio->dev.idx != PORT_B) { in csi_gpio_toggle() 223 if (gpio->dev.idx != PORT_A && gpio->dev.idx != PORT_B) { in csi_gpio_read() [all …]
|
/AliOS-Things-master/components/drivers/core/base/include/drivers/char/ |
A D | u_bus.h | 53 int (*pm)(struct u_device *dev, u_pm_ops_t state); 57 int (*probe)(struct u_device *dev); 58 int (*remove)(struct u_device *dev); 59 void (*shutdown)(struct u_device *dev); 60 int (*online)(struct u_device *dev); 61 int (*offline)(struct u_device *dev); 63 int (*resume)(struct u_device *dev); 66 int (*on_ping)(struct u_device *dev); 97 int u_bus_add_device(struct u_device *dev); 106 int u_bus_try_init_device(struct u_device *dev); [all …]
|