Virtual USB keybaord
[USB virtualization]

Virtual USB keyboard for virtual host controller. More...


Files

file  items.h
 HID Item related functions.
file  report.h
 HID Report Descriptor.

Defines

#define _IOF(value, shift)   ((value) << (shift))
#define BUILD_ITEM_PREFIX(size, type, tag)   ((size) | ((type) << 2) | ((tag) << 4))
 Creates item prefix.
#define COLLECTION_APPLICATION   0x01
#define COLLECTION_PHYSICAL   0x00
#define END_COLLECTION()   ITEM_CREATE0(ITEM_MAIN, TAG_END_COLLECTION)
 End a collection.
#define INPUT(modifiers)   ITEM_CREATE1(ITEM_MAIN, TAG_INPUT, modifiers)
#define IOF_ABSOLUTE   _IOF(0, 2)
#define IOF_ARRAY   _IOF(0, 1)
#define IOF_CONSTANT   _IOF(1, 0)
#define IOF_DATA   _IOF(0, 0)
#define IOF_RELATIVE   _IOF(1, 2)
#define IOF_VARIABLE   _IOF(1, 1)
#define ITEM_CREATE0(type, tag)   BUILD_ITEM_PREFIX(0, type, tag)
 Create no-data item.
#define ITEM_CREATE1(type, tag, data)   BUILD_ITEM_PREFIX(1, type, tag), data
 Create item with 1-byte data.
#define ITEM_GLOBAL   1
#define ITEM_LOCAL   2
#define ITEM_MAIN   0
#define LOGICAL_MAXIMUM1(value)   ITEM_CREATE1(ITEM_GLOBAL, TAG_LOGICAL_MAXIMUM, value)
#define LOGICAL_MINIMUM1(value)   ITEM_CREATE1(ITEM_GLOBAL, TAG_LOGICAL_MINIMUM, value)
#define OUTPUT(modifiers)   ITEM_CREATE1(ITEM_MAIN, TAG_OUTPUT, modifiers)
#define REPORT_COUNT1(count)   ITEM_CREATE1(ITEM_GLOBAL, TAG_REPORT_COUNT, count)
#define REPORT_SIZE1(size)   ITEM_CREATE1(ITEM_GLOBAL, TAG_REPORT_SIZE, size)
#define START_COLLECTION(collection)   ITEM_CREATE1(ITEM_MAIN, TAG_COLLECTION, collection)
 Start a collection.
#define STD_USAGE_PAGE(page)   ITEM_CREATE1(ITEM_GLOBAL, TAG_USAGE_PAGE, page)
 Use standard Usage Page.
#define TAG_COLLECTION   10
#define TAG_END_COLLECTION   12
#define TAG_FEATURE   11
#define TAG_INPUT   8
#define TAG_LOGICAL_MAXIMUM   2
#define TAG_LOGICAL_MINIMUM   1
#define TAG_OUTPUT   9
#define TAG_REPORT_COUNT   9
#define TAG_REPORT_SIZE   7
#define TAG_USAGE   0
#define TAG_USAGE_MAXIMUM   2
#define TAG_USAGE_MINIMUM   1
#define TAG_USAGE_PAGE   0
#define USAGE1(usage_id)   ITEM_CREATE1(ITEM_LOCAL, TAG_USAGE, usage_id)
 Usage with one byte usage ID.
#define USAGE_MAXIMUM1(value)   ITEM_CREATE1(ITEM_LOCAL, TAG_USAGE_MAXIMUM, value)
#define USAGE_MINIMUM1(value)   ITEM_CREATE1(ITEM_LOCAL, TAG_USAGE_MINIMUM, value)

Typedefs

typedef uint8_t report_descriptor_data_t []

Detailed Description

Virtual USB keyboard for virtual host controller.


Define Documentation

#define BUILD_ITEM_PREFIX ( size,
type,
tag   )     ((size) | ((type) << 2) | ((tag) << 4))

Creates item prefix.

Parameters:
size Item size.
type Item type.
tag Item tag.

Definition at line 91 of file items.h.

#define ITEM_CREATE0 ( type,
tag   )     BUILD_ITEM_PREFIX(0, type, tag)

Create no-data item.

Parameters:
type Item type.
tag Item tag.

Definition at line 98 of file items.h.

#define ITEM_CREATE1 ( type,
tag,
data   )     BUILD_ITEM_PREFIX(1, type, tag), data

Create item with 1-byte data.

Parameters:
type Item type.
tag Item tag.
data Item data (single byte).

Definition at line 106 of file items.h.


Generated on Thu Jun 2 07:45:56 2011 for HelenOS/USB by  doxygen 1.4.7