00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00036 #include "subdrivers.h"
00037 #include <usb/hid/usages/core.h>
00038 #include <usb/hid/hidpath.h>
00039
00040 #include "multimedia/multimedia.h"
00041 #include "mouse/mousedev.h"
00042 #include "generic/hiddev.h"
00043
00044 static usb_hid_subdriver_usage_t path_kbd[] = {
00045 {USB_HIDUT_PAGE_GENERIC_DESKTOP,
00046 USB_HIDUT_USAGE_GENERIC_DESKTOP_KEYBOARD},
00047 {0, 0}
00048 };
00049
00050 static usb_hid_subdriver_usage_t path_mouse[] = {
00051 {USB_HIDUT_PAGE_GENERIC_DESKTOP, USB_HIDUT_USAGE_GENERIC_DESKTOP_MOUSE},
00052 {0, 0}
00053 };
00054
00055 static usb_hid_subdriver_usage_t multim_key_path[] = {
00056 {USB_HIDUT_PAGE_CONSUMER, USB_HIDUT_USAGE_CONSUMER_CONSUMER_CONTROL},
00057 {0, 0}
00058 };
00059
00060 const usb_hid_subdriver_mapping_t usb_hid_subdrivers[] = {
00061 {
00062 path_kbd,
00063 0,
00064 USB_HID_PATH_COMPARE_BEGIN,
00065 -1,
00066 -1,
00067 {
00068 .init = usb_kbd_init,
00069 .deinit = usb_kbd_deinit,
00070 .poll = usb_kbd_polling_callback,
00071 .poll_end = NULL
00072 },
00073
00074 },
00075 {
00076 multim_key_path,
00077 1,
00078 USB_HID_PATH_COMPARE_BEGIN,
00079 -1,
00080 -1,
00081 {
00082 .init = usb_multimedia_init,
00083 .deinit = usb_multimedia_deinit,
00084 .poll = usb_multimedia_polling_callback,
00085 .poll_end = NULL
00086 }
00087 },
00088 {
00089 path_mouse,
00090 0,
00091 USB_HID_PATH_COMPARE_BEGIN,
00092 -1,
00093 -1,
00094 {
00095 .init = usb_mouse_init,
00096 .deinit = usb_mouse_deinit,
00097 .poll = usb_mouse_polling_callback,
00098 .poll_end = NULL
00099 }
00100 },
00101 {NULL, -1, 0, -1, -1, {NULL, NULL, NULL, NULL, NULL}}
00102 };
00103