#include "/usr/src/linux-headers-3.13.0-34-generic/include/generated/autoconf.h"#include <linux/kernel.h>#include <linux/errno.h>#include <linux/init.h>#include <linux/slab.h>#include <linux/module.h>#include <linux/kref.h>#include <asm/uaccess.h>#include <linux/usb.h>#include "urbtc.h"#include "urobotc.h"
Go to the source code of this file.
Classes | |
| struct | usb_urbtc |
Defines | |
| #define | DEBUG |
| #define | EP_CCMD 6 |
| #define | EP_READ 5 |
| #define | EP_READREQ 1 |
| #define | EP_SCMD 2 |
| #define | MAX_TRANSFER (PAGE_SIZE - 512) |
| #define | to_urbtc_dev(d) container_of(d, struct usb_urbtc, kref) |
| #define | USB_URBTC_MINOR_BASE 100 |
| #define | WRITES_IN_FLIGHT 8 |
Functions | |
| MODULE_DEVICE_TABLE (usb, urbtc_table) | |
| module_exit (usb_urbtc_exit) | |
| module_init (usb_urbtc_init) | |
| MODULE_LICENSE ("GPL") | |
| static void | urbtc_delete (struct kref *kref) |
| static void | urbtc_disconnect (struct usb_interface *interface) |
| static long | urbtc_ioctl (struct file *file, unsigned int cmd, unsigned long arg) |
| static int | urbtc_open (struct inode *inode, struct file *file) |
| static int | urbtc_probe (struct usb_interface *interface, const struct usb_device_id *id) |
| static ssize_t | urbtc_read (struct file *file, char *buffer, size_t count, loff_t *ppos) |
| static void | urbtc_read_bulk_callback (struct urb *urb) |
| static int | urbtc_release (struct inode *inode, struct file *file) |
| static ssize_t | urbtc_write (struct file *file, const char *user_buffer, size_t count, loff_t *ppos) |
| static ssize_t | urbtc_write_async (struct file *file, const char *user_buffer, size_t count, loff_t *ppos) |
| static void | urbtc_write_bulk_callback (struct urb *urb) |
| static ssize_t | urbtc_write_sync (struct file *file, const char *user_buffer, size_t count, loff_t *ppos) |
| static void __exit | usb_urbtc_exit (void) |
| static int __init | usb_urbtc_init (void) |
Variables | |
| static struct usb_class_driver | urbtc_class |
| static struct usb_driver | urbtc_driver |
| static struct file_operations | urbtc_fops |
| static struct usb_device_id | urbtc_table [] |
| #define EP_READREQ 1 |
| #define MAX_TRANSFER (PAGE_SIZE - 512) |
| #define to_urbtc_dev | ( | d | ) | container_of(d, struct usb_urbtc, kref) |
| #define USB_URBTC_MINOR_BASE 100 |
| #define WRITES_IN_FLIGHT 8 |
| MODULE_DEVICE_TABLE | ( | usb | , |
| urbtc_table | |||
| ) |
| MODULE_LICENSE | ( | "GPL" | ) |
| static void urbtc_delete | ( | struct kref * | kref | ) | [static] |
| static void urbtc_disconnect | ( | struct usb_interface * | interface | ) | [static] |
| static long urbtc_ioctl | ( | struct file * | file, |
| unsigned int | cmd, | ||
| unsigned long | arg | ||
| ) | [static] |
| static int urbtc_open | ( | struct inode * | inode, |
| struct file * | file | ||
| ) | [static] |
| static int urbtc_probe | ( | struct usb_interface * | interface, |
| const struct usb_device_id * | id | ||
| ) | [static] |
| static ssize_t urbtc_read | ( | struct file * | file, |
| char * | buffer, | ||
| size_t | count, | ||
| loff_t * | ppos | ||
| ) | [static] |
| static void urbtc_read_bulk_callback | ( | struct urb * | urb | ) | [static] |
| static int urbtc_release | ( | struct inode * | inode, |
| struct file * | file | ||
| ) | [static] |
| static ssize_t urbtc_write | ( | struct file * | file, |
| const char * | user_buffer, | ||
| size_t | count, | ||
| loff_t * | ppos | ||
| ) | [static] |
| static ssize_t urbtc_write_async | ( | struct file * | file, |
| const char * | user_buffer, | ||
| size_t | count, | ||
| loff_t * | ppos | ||
| ) | [static] |
| static void urbtc_write_bulk_callback | ( | struct urb * | urb | ) | [static] |
| static ssize_t urbtc_write_sync | ( | struct file * | file, |
| const char * | user_buffer, | ||
| size_t | count, | ||
| loff_t * | ppos | ||
| ) | [static] |
| static void __exit usb_urbtc_exit | ( | void | ) | [static] |
| static int __init usb_urbtc_init | ( | void | ) | [static] |
struct usb_class_driver urbtc_class [static] |
{
.name = "urbtc%d",
.fops = &urbtc_fops,
.minor_base = USB_URBTC_MINOR_BASE,
}
static struct usb_driver urbtc_driver [static] |
{
.name = "urbtc",
.probe = urbtc_probe,
.disconnect = urbtc_disconnect,
.id_table = urbtc_table,
}
struct file_operations urbtc_fops [static] |
{
.owner = THIS_MODULE,
.read = urbtc_read,
.write = urbtc_write,
.unlocked_ioctl = urbtc_ioctl,
.open = urbtc_open,
.release = urbtc_release,
}
struct usb_device_id urbtc_table[] [static] |