Lines Matching full:device
10 * 2012-10-20 Bernard add device check in register function,
12 * 2012-12-25 Bernard return RT_EOK if the device interface not exist.
41 * This function registers a device driver with specified name.
43 * @param dev the pointer of device driver structure
44 * @param name the device driver's name
45 * @param flags the capabilities flag of device
74 * This function removes a previously registered device driver
76 * @param dev the pointer of device driver structure
93 * This function initializes all registered device driver
98 * of a device is performed when applicaiton opens it.
106 * This function finds a device driver by specified name.
108 * @param name the device driver's name
110 * @return the registered device driver on successful, or RT_NULL on failure.
122 /* try to find device object */ in rt_device_find()
151 * This function creates a device object with user data size.
153 * @param type, the kind type of this device object.
156 * @return the allocated device object, or RT_NULL when failed.
161 rt_device_t device; in rt_device_create() local
168 device = (rt_device_t)rt_malloc(size); in rt_device_create()
169 if (device) in rt_device_create()
171 rt_memset(device, 0x0, sizeof(struct rt_device)); in rt_device_create()
172 device->type = (enum rt_device_class_type)type; in rt_device_create()
175 return device; in rt_device_create()
180 * This function destroy the specific device object.
182 * @param dev, the specific device object.
192 /* release this device object */ in rt_device_destroy()
199 * This function will initialize the specified device
201 * @param dev the pointer of device driver structure
211 /* get device init handler */ in rt_device_init()
219 rt_kprintf("To initialize device:%s failed. The error code is %d\n", in rt_device_init()
233 * This function will open a device
235 * @param dev the pointer of device driver structure
236 * @param oflag the flags for device open
247 /* if device is not initialized, initialize it. */ in rt_device_open()
255 rt_kprintf("To initialize device:%s failed. The error code is %d\n", in rt_device_open()
265 /* device is a stand alone device and opened */ in rt_device_open()
272 /* call device open interface */ in rt_device_open()
299 * This function will close a device
301 * @param dev the pointer of device driver structure
320 /* call device close interface */ in rt_device_close()
335 * This function will read some data from a device.
337 * @param dev the pointer of device driver structure
344 * @note since 0.4.0, the unit of size/pos is a block for block device.
360 /* call device read interface */ in rt_device_read()
374 * This function will write some data to a device.
376 * @param dev the pointer of device driver structure
378 * @param buffer the data buffer to be written to device
383 * @note since 0.4.0, the unit of size/pos is a block for block device.
399 /* call device write interface */ in rt_device_write()
415 * @param dev the pointer of device driver structure
416 * @param cmd the command sent to device
426 /* call device write interface */ in rt_device_control()
438 * is invoked when this device receives data.
440 * @param dev the pointer of device driver structure
459 * This function will set the indication callback function when device has
462 * @param dev the pointer of device driver structure