Home
last modified time | relevance | path

Searched refs:device (Results 1 – 25 of 203) sorted by relevance

123456789

/components/drivers/spi/
A Ddev_spi_core.c104 device->bus->owner = device; in rt_spi_bus_attach_device_cspin()
146 result = device->bus->ops->configure(device, &device->config); in rt_spi_bus_configure()
231 if (device->bus->owner != device) in rt_spi_send_then_send()
234 result = device->bus->ops->configure(device, &device->config); in rt_spi_send_then_send()
306 if (device->bus->owner != device) in rt_spi_send_then_recv()
309 result = device->bus->ops->configure(device, &device->config); in rt_spi_send_then_recv()
383 result = device->bus->ops->configure(device, &device->config); in rt_spi_transfer()
487 if (device->bus->owner != device) in rt_spi_transfer_message()
490 result = device->bus->ops->configure(device, &device->config); in rt_spi_transfer_message()
537 if (device->bus->owner != device) in rt_spi_take_bus()
[all …]
A Ddev_spi.c64 struct rt_device *device; in rt_spi_bus_device_init() local
67 device = &bus->parent; in rt_spi_bus_device_init()
75 device->init = RT_NULL; in rt_spi_bus_device_init()
76 device->open = RT_NULL; in rt_spi_bus_device_init()
77 device->close = RT_NULL; in rt_spi_bus_device_init()
80 device->control = RT_NULL; in rt_spi_bus_device_init()
145 struct rt_device *device; in rt_spidev_device_init() local
148 device = &(dev->parent); in rt_spidev_device_init()
155 device->init = RT_NULL; in rt_spidev_device_init()
156 device->open = RT_NULL; in rt_spidev_device_init()
[all …]
A Ddev_qspi_core.c19 RT_ASSERT(device != RT_NULL); in rt_qspi_configure()
23 if (device->parent.cs_pin != PIN_NONE) in rt_qspi_configure()
56 device->config.parent.mode = cfg->parent.mode; in rt_qspi_configure()
65 device->config.medium_size = cfg->medium_size; in rt_qspi_configure()
66 device->config.ddr_mode = cfg->ddr_mode; in rt_qspi_configure()
69 return rt_spi_bus_configure(&device->parent); in rt_qspi_configure()
84 RT_ASSERT(device != RT_NULL); in rt_qspi_transfer_message()
99 if (device->parent.bus->owner != &device->parent) in rt_qspi_transfer_message()
102 result = device->parent.bus->ops->configure(&device->parent, &device->parent.config); in rt_qspi_transfer_message()
106 device->parent.bus->owner = &device->parent; in rt_qspi_transfer_message()
[all …]
A Ddev_spi_bus.c106 device->id = id; in spi_match()
115 device->ofw_id = rt_ofw_node_match(device->parent.ofw_node, driver->ofw_ids); in spi_match()
117 if (device->ofw_id) in spi_match()
119 device->id = RT_NULL; in spi_match()
135 if (!device->bus) in spi_probe()
147 bus = device->bus; in spi_probe()
151 device->cs_pin = bus->cs_pins[device->chip_select[0]]; in spi_probe()
163 rt_spidev_device_init(device, rt_dm_dev_get_name(&device->parent)); in spi_probe()
176 driver->remove(device); in spi_remove()
178 rt_free(device); in spi_remove()
[all …]
/components/legacy/usb/usbhost/core/
A Dusbhost_core.c109 rt_usb_hcd_alloc_pipe(device->hcd, &device->pipe_ep0_out, device, &ep0_out_desc); in rt_usbh_attatch_instance()
110 rt_usb_hcd_alloc_pipe(device->hcd, &device->pipe_ep0_in, device, &ep0_in_desc); in rt_usbh_attatch_instance()
123 rt_usbh_hub_reset_port(device->parent_hub, device->port); in rt_usbh_attatch_instance()
135 rt_usb_hcd_free_pipe(device->hcd,device->pipe_ep0_out); in rt_usbh_attatch_instance()
136 rt_usb_hcd_free_pipe(device->hcd,device->pipe_ep0_in); in rt_usbh_attatch_instance()
143 rt_usb_hcd_alloc_pipe(device->hcd, &device->pipe_ep0_out, device, &ep0_out_desc); in rt_usbh_attatch_instance()
144 rt_usb_hcd_alloc_pipe(device->hcd, &device->pipe_ep0_in, device, &ep0_in_desc); in rt_usbh_attatch_instance()
235 device->intf[i]->device = device; in rt_usbh_attatch_instance()
281 RT_ASSERT(device->intf[i]->device == device); in rt_usbh_detach_instance()
293 while(device->pipe.next!= &device->pipe) in rt_usbh_detach_instance()
[all …]
/components/dfs/dfs_v2/filesystems/devfs/
A Ddevfs.c60 if (device->fops && device->fops->open) in dfs_devfs_open()
100 if (device->fops && device->fops->close) in dfs_devfs_close()
153 if (device->fops && device->fops->read) in dfs_devfs_read()
192 if (device->fops && device->fops->write) in dfs_devfs_write()
232 if (device->fops && device->fops->ioctl) in dfs_devfs_ioctl()
268 if (device->fops && device->fops->poll) in dfs_devfs_poll()
291 if (device->fops && device->fops->flush) in dfs_devfs_flush()
314 if (device->fops && device->fops->lseek) in dfs_devfs_lseek()
360 if (device->fops && device->fops->mmap) in dfs_devfs_mmap()
383 if (device->fops && device->fops->lock) in dfs_devfs_lock()
[all …]
/components/legacy/usb/usbdevice/core/
A Dusbdevice_core.c54 rt_usbd_ep0_write(device, (rt_uint8_t*) &device->dev_desc, size); in _get_device_descriptor()
165 if(device->dev_qualifier && device->dcd->device_is_hs) in _get_qualifier_descriptor()
168 rt_usbd_ep0_write(device, (rt_uint8_t*)device->dev_qualifier, in _get_qualifier_descriptor()
403 cfg = device->curr_cfg; in _set_config()
513 dcd = device->dcd; in _standard_request()
1117 device->dcd = dcd; in rt_usbd_device_set_controller()
1202 device->nr_intf++; in rt_usbd_interface_new()
1303 func->device = device; in rt_usbd_function_new()
1355 udevice_t device; in rt_usbd_find_device() local
1364 if(device->dcd == dcd) return device; in rt_usbd_find_device()
[all …]
/components/drivers/hwcrypto/
A Dhwcrypto.c55 if (ctx && ctx->device->ops->reset) in rt_hwcrypto_ctx_reset()
57 ctx->device->ops->reset(ctx); in rt_hwcrypto_ctx_reset()
77 ctx->device = device; in rt_hwcrypto_ctx_init()
79 err = ctx->device->ops->create(ctx); in rt_hwcrypto_ctx_init()
134 if (ctx->device->ops->destroy) in rt_hwcrypto_ctx_destroy()
136 ctx->device->ops->destroy(ctx); in rt_hwcrypto_ctx_destroy()
158 if (des->device != src->device || in rt_hwcrypto_ctx_cpy()
197 if (device) in rt_hwcrypto_id()
199 return device->id; in rt_hwcrypto_id()
228 RT_ASSERT(device != RT_NULL); in rt_hwcrypto_register()
[all …]
/components/drivers/wlan/
A Ddev_wlan.c86 device->mode = mode; in rt_wlan_dev_init()
95 if (device == RT_NULL) in rt_wlan_dev_connect()
130 if (device == RT_NULL) in rt_wlan_dev_fast_connect()
162 if (device == RT_NULL) in rt_wlan_dev_disconnect()
176 if (device == RT_NULL) in rt_wlan_dev_ap_start()
211 if (device == RT_NULL) in rt_wlan_dev_ap_stop()
224 if (device == RT_NULL) in rt_wlan_dev_ap_deauth()
238 if (device == RT_NULL) in rt_wlan_dev_get_rssi()
258 if (device == RT_NULL) in rt_wlan_dev_get_info()
277 if (device == RT_NULL) in rt_wlan_dev_ap_get_info()
[all …]
A Ddev_wlan.h454 struct rt_device device; member
536 rt_err_t rt_wlan_dev_disconnect(struct rt_wlan_device *device);
537 int rt_wlan_dev_get_rssi(struct rt_wlan_device *device);
544 rt_err_t rt_wlan_dev_ap_stop(struct rt_wlan_device *device);
552 rt_err_t rt_wlan_dev_scan_stop(struct rt_wlan_device *device);
563 rt_err_t rt_wlan_dev_set_powersave(struct rt_wlan_device *device, int level);
564 int rt_wlan_dev_get_powersave(struct rt_wlan_device *device);
576 rt_err_t rt_wlan_dev_enter_promisc(struct rt_wlan_device *device);
577 rt_err_t rt_wlan_dev_exit_promisc(struct rt_wlan_device *device);
590 int rt_wlan_dev_get_channel(struct rt_wlan_device *device);
[all …]
/components/legacy/usb/usbhost/class/
A Dhid.c37 struct uinstance* device; in rt_usbh_hid_set_idle() local
44 device = intf->device; in rt_usbh_hid_set_idle()
53 if (rt_usb_hcd_setup_xfer(device->hcd, device->pipe_ep0_out, &setup, timeout) == 8) in rt_usbh_hid_set_idle()
73 struct uinstance* device; in rt_usbh_hid_get_report() local
80 device = intf->device; in rt_usbh_hid_get_report()
89 if (rt_usb_hcd_setup_xfer(device->hcd, device->pipe_ep0_out, &setup, timeout) == 8) in rt_usbh_hid_get_report()
123 device = intf->device; in rt_usbh_hid_set_report()
132 if (rt_usb_hcd_setup_xfer(device->hcd, device->pipe_ep0_out, &setup, timeout) == 8) in rt_usbh_hid_set_report()
156 device = intf->device; in rt_usbh_hid_set_protocal()
165 if (rt_usb_hcd_setup_xfer(device->hcd, device->pipe_ep0_out, &setup, timeout) == 8) in rt_usbh_hid_set_protocal()
[all …]
A Dadk.c61 uinst_t device; in rt_usbh_adk_get_protocol() local
68 device = intf->device; in rt_usbh_adk_get_protocol()
77 if(rt_usb_hcd_control_xfer(device->hcd, device, &setup, (void*)protocol, 2, in rt_usbh_adk_get_protocol()
95 uinst_t device; in rt_usbh_adk_send_string() local
102 device = intf->device; in rt_usbh_adk_send_string()
111 if(rt_usb_hcd_control_xfer(device->hcd, device, &setup, (void*)str, in rt_usbh_adk_send_string()
128 uinst_t device; in rt_usbh_adk_start() local
135 device = intf->device; in rt_usbh_adk_start()
144 if(rt_usb_hcd_control_xfer(device->hcd, device, &setup, RT_NULL, 0, in rt_usbh_adk_start()
164 RT_ASSERT(device != RT_NULL); in rt_usbh_adk_read()
[all …]
/components/drivers/include/drivers/
A Ddev_spi.h288 void (*exit_qspi_mode)(struct rt_qspi_device *device);
307 rt_err_t (*probe)(struct rt_spi_device *device);
308 rt_err_t (*remove)(struct rt_spi_device *device);
309 rt_err_t (*shutdown)(struct rt_spi_device *device);
319 return device->id ? device->id->data : (device->ofw_id ? device->ofw_id->data : RT_NULL); in rt_spi_device_id_data()
393 rt_err_t rt_spi_take_bus(struct rt_spi_device *device);
411 rt_err_t rt_spi_take(struct rt_spi_device *device);
420 rt_err_t rt_spi_release(struct rt_spi_device *device);
480 rt_ssize_t rt_spi_transfer(struct rt_spi_device *device,
494 rt_err_t rt_spi_sendrecv8(struct rt_spi_device *device,
[all …]
A Dmtd_nand.h22 #define RT_MTD_NAND_DEVICE(device) ((struct rt_mtd_nand_device*)(device)) argument
57 rt_err_t (*read_id)(struct rt_mtd_nand_device *device);
59 rt_err_t (*read_page)(struct rt_mtd_nand_device *device,
64 rt_err_t (*write_page)(struct rt_mtd_nand_device *device,
70 rt_err_t (*erase_block)(struct rt_mtd_nand_device *device, rt_uint32_t block);
71 rt_err_t (*check_block)(struct rt_mtd_nand_device *device, rt_uint32_t block);
72 rt_err_t (*mark_badblock)(struct rt_mtd_nand_device *device, rt_uint32_t block);
76 rt_uint32_t rt_mtd_nand_read_id(struct rt_mtd_nand_device *device);
78 struct rt_mtd_nand_device *device,
83 struct rt_mtd_nand_device *device,
[all …]
A Dmtd_nor.h17 #define RT_MTD_NOR_DEVICE(device) ((struct rt_mtd_nor_device*)(device)) argument
33 rt_err_t (*read_id) (struct rt_mtd_nor_device* device);
35 …rt_ssize_t (*read) (struct rt_mtd_nor_device* device, rt_off_t offset, rt_uint8_t* data, rt_siz…
36 …rt_ssize_t (*write) (struct rt_mtd_nor_device* device, rt_off_t offset, const rt_uint8_t* data, …
38 rt_err_t (*erase_block)(struct rt_mtd_nor_device* device, rt_off_t offset, rt_size_t length);
41 rt_err_t rt_mtd_nor_register_device(const char* name, struct rt_mtd_nor_device* device);
42 rt_uint32_t rt_mtd_nor_read_id(struct rt_mtd_nor_device* device);
43 rt_ssize_t rt_mtd_nor_read(struct rt_mtd_nor_device* device,
45 rt_ssize_t rt_mtd_nor_write(struct rt_mtd_nor_device* device,
47 rt_err_t rt_mtd_nor_erase_block(struct rt_mtd_nor_device* device,
/components/legacy/usb/
A DKconfig61 bool "Enable to use device as CDC device"
67 bool "Enable to use device as HID device"
70 bool "Enable to use device as rndis device"
74 bool "Enable to use device as ecm device"
78 bool "Enable to use device as winusb device"
81 bool "Enable to use device as audio device"
86 bool "Enable to use device as CDC device"
95 bool "Enable to use device as HID device"
98 bool "Enable to use device as rndis device"
102 bool "Enable to use device as ecm device"
[all …]
/components/drivers/misc/
A Drt_drv_pwm.c124 device->parent.init = RT_NULL; in rt_device_pwm_register()
125 device->parent.open = RT_NULL; in rt_device_pwm_register()
126 device->parent.close = RT_NULL; in rt_device_pwm_register()
146 if (!device) in rt_pwm_enable()
175 if (!device) in rt_pwm_disable()
204 if (!device) in rt_pwm_set()
222 if (!device) in rt_pwm_set_period()
239 if (!device) in rt_pwm_set_pulse()
256 if (!device) in rt_pwm_set_dead_time()
274 if (!device) in rt_pwm_set_phase()
[all …]
A Dpulse_encoder.c111 struct rt_device *device; in rt_device_pulse_encoder_register() local
116 device = &(pulse_encoder->parent); in rt_device_pulse_encoder_register()
119 device->rx_indicate = RT_NULL; in rt_device_pulse_encoder_register()
120 device->tx_complete = RT_NULL; in rt_device_pulse_encoder_register()
123 device->ops = &pulse_encoder_ops; in rt_device_pulse_encoder_register()
125 device->init = rt_pulse_encoder_init; in rt_device_pulse_encoder_register()
126 device->open = rt_pulse_encoder_open; in rt_device_pulse_encoder_register()
127 device->close = rt_pulse_encoder_close; in rt_device_pulse_encoder_register()
128 device->read = rt_pulse_encoder_read; in rt_device_pulse_encoder_register()
129 device->write = RT_NULL; in rt_device_pulse_encoder_register()
[all …]
/components/utilities/rt-link/src/
A Drtlink_dev.c31 rt_device_t device; in rtlink_fops_open() local
63 rt_device_t device; in rtlink_fops_close() local
67 return rt_device_close(device); in rtlink_fops_close()
72 rt_device_t device; in rtlink_fops_ioctl() local
88 rt_device_t device; in rtlink_fops_read() local
102 rt_device_t device; in rtlink_fops_write() local
117 rt_device_t device; in rtlink_fops_poll() local
121 RT_ASSERT(device != RT_NULL); in rtlink_fops_poll()
368 struct rt_device *device; in rt_link_dev_register() local
373 device->rx_indicate = RT_NULL; in rt_link_dev_register()
[all …]
/components/drivers/watchdog/
A Ddev_watchdog.c87 struct rt_device *device; in rt_hw_watchdog_register() local
90 device = &(wtd->parent); in rt_hw_watchdog_register()
93 device->rx_indicate = RT_NULL; in rt_hw_watchdog_register()
94 device->tx_complete = RT_NULL; in rt_hw_watchdog_register()
97 device->ops = &wdt_ops; in rt_hw_watchdog_register()
99 device->init = rt_watchdog_init; in rt_hw_watchdog_register()
100 device->open = rt_watchdog_open; in rt_hw_watchdog_register()
101 device->close = rt_watchdog_close; in rt_hw_watchdog_register()
102 device->read = RT_NULL; in rt_hw_watchdog_register()
103 device->write = RT_NULL; in rt_hw_watchdog_register()
[all …]
/components/drivers/mtd/
A Dmtd_nor.c67 struct rt_mtd_nor_device *device) in rt_mtd_nor_register_device() argument
71 dev = RT_DEVICE(device); in rt_mtd_nor_register_device()
94 rt_uint32_t rt_mtd_nor_read_id(struct rt_mtd_nor_device* device) in rt_mtd_nor_read_id() argument
96 return device->ops->read_id(device); in rt_mtd_nor_read_id()
99 rt_ssize_t rt_mtd_nor_read(struct rt_mtd_nor_device* device, in rt_mtd_nor_read() argument
102 return device->ops->read(device, offset, data, length); in rt_mtd_nor_read()
105 rt_ssize_t rt_mtd_nor_write(struct rt_mtd_nor_device* device, in rt_mtd_nor_write() argument
108 return device->ops->write(device, offset, data, length); in rt_mtd_nor_write()
111 rt_err_t rt_mtd_nor_erase_block(struct rt_mtd_nor_device* device, in rt_mtd_nor_erase_block() argument
114 return device->ops->erase_block(device, offset, length); in rt_mtd_nor_erase_block()
A Dmtd_nand.c75 dev = RT_DEVICE(device); in rt_mtd_nand_register_device()
100 RT_ASSERT(device->ops->read_id); in rt_mtd_nand_read_id()
101 return device->ops->read_id(device); in rt_mtd_nand_read_id()
111 return device->ops->read_page(device, page, data, data_len, spare, spare_len); in rt_mtd_nand_read()
121 return device->ops->write_page(device, page, data, data_len, spare, spare_len); in rt_mtd_nand_write()
128 return device->ops->move_page(device, src_page, dst_page); in rt_mtd_nand_move_page()
134 return device->ops->erase_block(device, block); in rt_mtd_nand_erase_block()
139 if (device->ops->check_block) in rt_mtd_nand_check_block()
141 return device->ops->check_block(device, block); in rt_mtd_nand_check_block()
151 if (device->ops->mark_badblock) in rt_mtd_nand_mark_badblock()
[all …]
/components/drivers/usb/cherryusb/platform/rtthread/
A Dusbd_adb_shell.c100 struct rt_device *device; in usbd_adb_shell_init() local
102 device = &(g_usbd_adb_shell.parent); in usbd_adb_shell_init()
105 device->rx_indicate = RT_NULL; in usbd_adb_shell_init()
106 device->tx_complete = RT_NULL; in usbd_adb_shell_init()
109 device->ops = &usbd_adb_shell_ops; in usbd_adb_shell_init()
111 device->init = NULL; in usbd_adb_shell_init()
112 device->open = usbd_adb_shell_open; in usbd_adb_shell_init()
114 device->read = usbd_adb_shell_read; in usbd_adb_shell_init()
116 device->control = NULL; in usbd_adb_shell_init()
118 device->user_data = NULL; in usbd_adb_shell_init()
[all …]
/components/drivers/pinctrl/
A Dpinctrl.c160 rt_ssize_t rt_pin_ctrl_confs_lookup(struct rt_device *device, const char *name) in rt_pin_ctrl_confs_lookup() argument
164 if (device && name) in rt_pin_ctrl_confs_lookup()
169 if (device->ofw_node) in rt_pin_ctrl_confs_lookup()
171 res = ofw_pin_ctrl_confs_lookup(device->ofw_node, name); in rt_pin_ctrl_confs_lookup()
183 rt_err_t rt_pin_ctrl_confs_apply(struct rt_device *device, int index) in rt_pin_ctrl_confs_apply() argument
187 if (device && index >= 0) in rt_pin_ctrl_confs_apply()
192 if (device->ofw_node) in rt_pin_ctrl_confs_apply()
194 err = ofw_pin_ctrl_confs_apply(device->ofw_node, index); in rt_pin_ctrl_confs_apply()
210 if (device) in rt_pin_ctrl_confs_apply_by_name()
220 if (device->ofw_node) in rt_pin_ctrl_confs_apply_by_name()
[all …]
/components/drivers/i2c/
A Ddev_i2c_dev.c112 struct rt_device *device; in rt_i2c_bus_device_device_init() local
115 device = &bus->parent; in rt_i2c_bus_device_device_init()
117 device->user_data = bus; in rt_i2c_bus_device_device_init()
120 device->type = RT_Device_Class_I2CBUS; in rt_i2c_bus_device_device_init()
123 device->ops = &i2c_ops; in rt_i2c_bus_device_device_init()
125 device->init = RT_NULL; in rt_i2c_bus_device_device_init()
126 device->open = RT_NULL; in rt_i2c_bus_device_device_init()
127 device->close = RT_NULL; in rt_i2c_bus_device_device_init()
128 device->read = i2c_bus_device_read; in rt_i2c_bus_device_device_init()
129 device->write = i2c_bus_device_write; in rt_i2c_bus_device_device_init()
[all …]

Completed in 60 milliseconds

123456789