Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
wacom_sys.c File Reference
#include "wacom_wac.h"
#include "wacom.h"

Go to the source code of this file.

Data Structures

struct  hid_descriptor
 
struct  wacom_usbdev_data
 

Macros

#define HID_DEVICET_HID   (USB_TYPE_CLASS | 0x01)
 
#define HID_DEVICET_REPORT   (USB_TYPE_CLASS | 0x02)
 
#define HID_USAGE_UNDEFINED   0x00
 
#define HID_USAGE_PAGE   0x05
 
#define HID_USAGE_PAGE_DIGITIZER   0x0d
 
#define HID_USAGE_PAGE_DESKTOP   0x01
 
#define HID_USAGE   0x09
 
#define HID_USAGE_X   0x30
 
#define HID_USAGE_Y   0x31
 
#define HID_USAGE_X_TILT   0x3d
 
#define HID_USAGE_Y_TILT   0x3e
 
#define HID_USAGE_FINGER   0x22
 
#define HID_USAGE_STYLUS   0x20
 
#define HID_USAGE_CONTACTMAX   0x55
 
#define HID_COLLECTION   0xa1
 
#define HID_COLLECTION_LOGICAL   0x02
 
#define HID_COLLECTION_END   0xc0
 
#define USB_REQ_GET_REPORT   0x01
 
#define USB_REQ_SET_REPORT   0x09
 
#define WAC_HID_FEATURE_REPORT   0x03
 
#define WAC_MSG_RETRIES   5
 
#define WAC_CMD_LED_CONTROL   0x20
 
#define WAC_CMD_ICON_START   0x21
 
#define WAC_CMD_ICON_XFER   0x23
 
#define WAC_CMD_RETRIES   10
 
#define DEVICE_LED_SELECT_ATTR(SET_ID)
 
#define DEVICE_LUMINANCE_ATTR(name, field)
 
#define DEVICE_BTNIMG_ATTR(BUTTON_ID)
 

Enumerations

enum  { WCM_UNDEFINED = 0, WCM_DESKTOP, WCM_DIGITIZER }
 

Functions

struct hid_descriptor __attribute__ ((packed))
 
 DEVICE_LED_SELECT_ATTR (0)
 
 DEVICE_LED_SELECT_ATTR (1)
 
 DEVICE_LUMINANCE_ATTR (status0, llv)
 
 DEVICE_LUMINANCE_ATTR (status1, hlv)
 
 DEVICE_LUMINANCE_ATTR (buttons, img_lum)
 
 DEVICE_BTNIMG_ATTR (0)
 
 DEVICE_BTNIMG_ATTR (1)
 
 DEVICE_BTNIMG_ATTR (2)
 
 DEVICE_BTNIMG_ATTR (3)
 
 DEVICE_BTNIMG_ATTR (4)
 
 DEVICE_BTNIMG_ATTR (5)
 
 DEVICE_BTNIMG_ATTR (6)
 
 DEVICE_BTNIMG_ATTR (7)
 
 module_usb_driver (wacom_driver)
 

Variables

struct usb_descriptor_header header
 
__le16 bcdHID
 
u8 bCountryCode
 
u8 bNumDescriptors
 
u8 bDescriptorType
 
__le16 wDescriptorLength
 
struct wacom_usbdev_data __attribute__
 

Macro Definition Documentation

#define DEVICE_BTNIMG_ATTR (   BUTTON_ID)
Value:
static ssize_t wacom_btnimg##BUTTON_ID##_store(struct device *dev, \
struct device_attribute *attr, const char *buf, size_t count) \
{ \
return wacom_button_image_store(dev, BUTTON_ID, buf, count); \
} \
static DEVICE_ATTR(button##BUTTON_ID##_rawimg, S_IWUSR, \
NULL, wacom_btnimg##BUTTON_ID##_store)

Definition at line 900 of file wacom_sys.c.

#define DEVICE_LED_SELECT_ATTR (   SET_ID)
Value:
static ssize_t wacom_led##SET_ID##_select_store(struct device *dev, \
struct device_attribute *attr, const char *buf, size_t count) \
{ \
return wacom_led_select_store(dev, SET_ID, buf, count); \
} \
static ssize_t wacom_led##SET_ID##_select_show(struct device *dev, \
struct device_attribute *attr, char *buf) \
{ \
return snprintf(buf, 2, "%d\n", wacom->led.select[SET_ID]); \
} \
static DEVICE_ATTR(status_led##SET_ID##_select, S_IWUSR | S_IRUSR, \
wacom_led##SET_ID##_select_show, \
wacom_led##SET_ID##_select_store)

Definition at line 827 of file wacom_sys.c.

#define DEVICE_LUMINANCE_ATTR (   name,
  field 
)
Value:
static ssize_t wacom_##name##_luminance_store(struct device *dev, \
struct device_attribute *attr, const char *buf, size_t count) \
{ \
\
return wacom_luminance_store(wacom, &wacom->led.field, \
buf, count); \
} \
static DEVICE_ATTR(name##_luminance, S_IWUSR, \
NULL, wacom_##name##_luminance_store)

Definition at line 866 of file wacom_sys.c.

#define HID_COLLECTION   0xa1

Definition at line 32 of file wacom_sys.c.

#define HID_COLLECTION_END   0xc0

Definition at line 34 of file wacom_sys.c.

#define HID_COLLECTION_LOGICAL   0x02

Definition at line 33 of file wacom_sys.c.

#define HID_DEVICET_HID   (USB_TYPE_CLASS | 0x01)

Definition at line 18 of file wacom_sys.c.

#define HID_DEVICET_REPORT   (USB_TYPE_CLASS | 0x02)

Definition at line 19 of file wacom_sys.c.

#define HID_USAGE   0x09

Definition at line 24 of file wacom_sys.c.

#define HID_USAGE_CONTACTMAX   0x55

Definition at line 31 of file wacom_sys.c.

#define HID_USAGE_FINGER   0x22

Definition at line 29 of file wacom_sys.c.

#define HID_USAGE_PAGE   0x05

Definition at line 21 of file wacom_sys.c.

#define HID_USAGE_PAGE_DESKTOP   0x01

Definition at line 23 of file wacom_sys.c.

#define HID_USAGE_PAGE_DIGITIZER   0x0d

Definition at line 22 of file wacom_sys.c.

#define HID_USAGE_STYLUS   0x20

Definition at line 30 of file wacom_sys.c.

#define HID_USAGE_UNDEFINED   0x00

Definition at line 20 of file wacom_sys.c.

#define HID_USAGE_X   0x30

Definition at line 25 of file wacom_sys.c.

#define HID_USAGE_X_TILT   0x3d

Definition at line 27 of file wacom_sys.c.

#define HID_USAGE_Y   0x31

Definition at line 26 of file wacom_sys.c.

#define HID_USAGE_Y_TILT   0x3e

Definition at line 28 of file wacom_sys.c.

#define USB_REQ_GET_REPORT   0x01

Definition at line 52 of file wacom_sys.c.

#define USB_REQ_SET_REPORT   0x09

Definition at line 53 of file wacom_sys.c.

#define WAC_CMD_ICON_START   0x21

Definition at line 59 of file wacom_sys.c.

#define WAC_CMD_ICON_XFER   0x23

Definition at line 60 of file wacom_sys.c.

#define WAC_CMD_LED_CONTROL   0x20

Definition at line 58 of file wacom_sys.c.

#define WAC_CMD_RETRIES   10

Definition at line 61 of file wacom_sys.c.

#define WAC_HID_FEATURE_REPORT   0x03

Definition at line 55 of file wacom_sys.c.

#define WAC_MSG_RETRIES   5

Definition at line 56 of file wacom_sys.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
WCM_UNDEFINED 
WCM_DESKTOP 
WCM_DIGITIZER 

Definition at line 36 of file wacom_sys.c.

Function Documentation

struct hid_descriptor __attribute__ ( (packed)  )
read

Definition at line 171 of file esd_usb2.c.

DEVICE_BTNIMG_ATTR ( )
DEVICE_BTNIMG_ATTR ( )
DEVICE_BTNIMG_ATTR ( )
DEVICE_BTNIMG_ATTR ( )
DEVICE_BTNIMG_ATTR ( )
DEVICE_BTNIMG_ATTR ( )
DEVICE_BTNIMG_ATTR ( )
DEVICE_BTNIMG_ATTR ( )
DEVICE_LED_SELECT_ATTR ( )
DEVICE_LED_SELECT_ATTR ( )
DEVICE_LUMINANCE_ATTR ( status0  ,
llv   
)
DEVICE_LUMINANCE_ATTR ( status1  ,
hlv   
)
DEVICE_LUMINANCE_ATTR ( buttons  ,
img_lum   
)
module_usb_driver ( wacom_driver  )

Variable Documentation

__le16 bcdHID

Definition at line 51 of file wacom_sys.c.

u8 bCountryCode

Definition at line 52 of file wacom_sys.c.

u8 bDescriptorType

Definition at line 54 of file wacom_sys.c.

u8 bNumDescriptors

Definition at line 53 of file wacom_sys.c.

Definition at line 50 of file wacom_sys.c.

__le16 wDescriptorLength

Definition at line 55 of file wacom_sys.c.