#include "cfe.h"
#include "usbchap9.h"
#include "usbd.h"
Go to the source code of this file.
|  | 
| #define | CACHE_ALIGN   32       /* XXX place holder, big enough to now. */ | 
|  | 
| #define | BUFF_ALIGN   16 | 
|  | 
| #define | ALIGN(n,  align)   (((n)+((align)-1)) & ~((align)-1)) | 
|  | 
| #define | usb_dma_alloc(n)   (KMALLOC(ALIGN((n),CACHE_ALIGN),BUFF_ALIGN)) | 
|  | 
| #define | usb_dma_free(p)   (KFREE(p)) | 
|  | 
| #define | HID_BOOT_PROTOCOL   0 | 
|  | 
| #define | HID_REPORT_PROTOCOL   1 | 
|  | 
| #define | HID_DEVTYPE_UNKNOWN   0 | 
|  | 
| #define | HID_DEVTYPE_KBD   1 | 
|  | 
| #define | HID_DEVTYPE_MOUSE   2 | 
|  | 
| #define | HID_DEVTYPE_MAX   2 | 
|  | 
| #define | UBR_KBD_MODS   0 | 
|  | 
| #define | UBR_KBD_RSVD   1 | 
|  | 
| #define | UBR_KBD_KEYS   2 | 
|  | 
| #define | UBR_KBD_NUMKEYS   6 | 
|  | 
| #define | UBR_KBD_MAX   8 | 
|  | 
| #define | KBD_MOD_LCTRL   0x01 | 
|  | 
| #define | KBD_MOD_LSHIFT   0x02 | 
|  | 
| #define | KBD_MOD_LALT   0x04 | 
|  | 
| #define | KBD_MOD_LWIN   0x08 | 
|  | 
| #define | KBD_MOD_RCTRL   0x10 | 
|  | 
| #define | KBD_MOD_RSHIFT   0x20 | 
|  | 
| #define | KBD_MOD_RALT   0x40 | 
|  | 
| #define | KBD_MOD_RWIN   0x80 | 
|  | 
| #define | usbhid_set_protocol(dev,  protocol,  ifc)           usb_simple_request(dev,0x21,0x0B,0,ifc) | 
|  | 
| #define | FLG_NUM   0x0001  /* Toggles: same as bits for LEDs */ | 
|  | 
| #define | FLG_CAPS   0x0002 | 
|  | 
| #define | FLG_SCROLL   0x0004 | 
|  | 
| #define | FLG_SHIFT   0x0008  /* Shifts */ | 
|  | 
| #define | FLG_CTRL   0x0100 | 
|  | 
| #define | FLG_ALT   0x0200 | 
|  | 
| #define | FLG_FKEY   0x0400  /* function keys */ | 
|  | 
| #define | FLG_NKPD   0x0800  /* numeric keypad */ | 
|  | 
| #define | FLG_ASCII   0x1000  /* regular ASCII character */ | 
|  | 
| #define | FLG_NONE   0x2000 | 
|  | 
| #define | KC_RESPLEN   4 | 
|  | 
| #define | usbhid_scantablesize   (sizeof(usbhid_scantable)/sizeof(keycode_t)) | 
|  | 
◆ ALIGN
      
        
          | #define ALIGN | ( |  | n, | 
        
          |  |  |  | align | 
        
          |  | ) |  | (((n)+((align)-1)) & ~((align)-1)) | 
      
 
 
◆ BUFF_ALIGN
◆ CACHE_ALIGN
      
        
          | #define CACHE_ALIGN   32       /* XXX place holder, big enough to now. */ | 
      
 
 
◆ FLG_ALT
◆ FLG_ASCII
      
        
          | #define FLG_ASCII   0x1000  /* regular ASCII character */ | 
      
 
 
◆ FLG_CAPS
◆ FLG_CTRL
◆ FLG_FKEY
      
        
          | #define FLG_FKEY   0x0400  /* function keys */ | 
      
 
 
◆ FLG_NKPD
      
        
          | #define FLG_NKPD   0x0800  /* numeric keypad */ | 
      
 
 
◆ FLG_NONE
◆ FLG_NUM
      
        
          | #define FLG_NUM   0x0001  /* Toggles: same as bits for LEDs */ | 
      
 
 
◆ FLG_SCROLL
      
        
          | #define FLG_SCROLL   0x0004 | 
      
 
 
◆ FLG_SHIFT
      
        
          | #define FLG_SHIFT   0x0008  /* Shifts */ | 
      
 
 
◆ HID_BOOT_PROTOCOL
      
        
          | #define HID_BOOT_PROTOCOL   0 | 
      
 
 
◆ HID_DEVTYPE_KBD
      
        
          | #define HID_DEVTYPE_KBD   1 | 
      
 
 
◆ HID_DEVTYPE_MAX
      
        
          | #define HID_DEVTYPE_MAX   2 | 
      
 
 
◆ HID_DEVTYPE_MOUSE
      
        
          | #define HID_DEVTYPE_MOUSE   2 | 
      
 
 
◆ HID_DEVTYPE_UNKNOWN
      
        
          | #define HID_DEVTYPE_UNKNOWN   0 | 
      
 
 
◆ HID_REPORT_PROTOCOL
      
        
          | #define HID_REPORT_PROTOCOL   1 | 
      
 
 
◆ KBD_MOD_LALT
      
        
          | #define KBD_MOD_LALT   0x04 | 
      
 
 
◆ KBD_MOD_LCTRL
      
        
          | #define KBD_MOD_LCTRL   0x01 | 
      
 
 
◆ KBD_MOD_LSHIFT
      
        
          | #define KBD_MOD_LSHIFT   0x02 | 
      
 
 
◆ KBD_MOD_LWIN
      
        
          | #define KBD_MOD_LWIN   0x08 | 
      
 
 
◆ KBD_MOD_RALT
      
        
          | #define KBD_MOD_RALT   0x40 | 
      
 
 
◆ KBD_MOD_RCTRL
      
        
          | #define KBD_MOD_RCTRL   0x10 | 
      
 
 
◆ KBD_MOD_RSHIFT
      
        
          | #define KBD_MOD_RSHIFT   0x20 | 
      
 
 
◆ KBD_MOD_RWIN
      
        
          | #define KBD_MOD_RWIN   0x80 | 
      
 
 
◆ KC_RESPLEN
◆ UBR_KBD_KEYS
◆ UBR_KBD_MAX
◆ UBR_KBD_MODS
◆ UBR_KBD_NUMKEYS
      
        
          | #define UBR_KBD_NUMKEYS   6 | 
      
 
 
◆ UBR_KBD_RSVD
◆ usb_dma_alloc
◆ usb_dma_free
      
        
          | #define usb_dma_free | ( |  | p | ) | (KFREE(p)) | 
      
 
 
◆ usbhid_scantablesize
      
        
          | #define usbhid_scantablesize   (sizeof(usbhid_scantable)/sizeof(keycode_t)) | 
      
 
 
◆ usbhid_set_protocol
      
        
          | #define usbhid_set_protocol | ( |  | dev, | 
        
          |  |  |  | protocol, | 
        
          |  |  |  | ifc | 
        
          |  | ) |  | usb_simple_request(dev,0x21,0x0B,0,ifc) | 
      
 
 
◆ keycode_t
◆ usbhid_softc_t
◆ usbhid_driver
Initial value:= {
    "Human-Interface Device",
    usbhid_attach,
    usbhid_detach
}
Definition at line 121 of file usbhid.c.