00001
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 #ifndef _CONF_USB_H_
00044 #define _CONF_USB_H_
00045
00046 #include "modules/usb/usb_commun.h"
00047 #include "modules/usb/usb_commun_hid.h"
00048
00049
00053
00054
00055
00056
00061
00065 #define USB_HOST_FEATURE ENABLED
00066
00070 #define USB_DEVICE_FEATURE DISABLED
00071
00073
00074
00075
00078
00083 #ifndef USE_USB_PADS_REGULATOR
00084 #define USE_USB_PADS_REGULATOR ENABLE // Possible values ENABLE or DISABLE
00085 #endif
00087
00088
00089
00093
00094 #define PIPE_MOUSE_IN pipe_mouse_in
00095
00096
00097 extern U8 pipe_mouse_in;
00098
00099
00108 #define VID_PID_TABLE {VID_ATMEL, 2, PID_MegaHIDMouse, 0x2014 \
00109 ,0x0123, 3, 0x2000, 0x2100, 0x1258}
00110
00121 #define CLASS_SUBCLASS_PROTOCOL {\
00122 HID_CLASS, NO_SUBCLASS, HID_PROTOCOL_MOUSE,\
00123 HID_CLASS, HID_SUB_CLASS_BOOT, HID_PROTOCOL_MOUSE,\
00124 }
00125
00127 #define SIZEOF_DATA_STAGE 250
00128
00130 #define DEVICE_BASE_ADDRESS 0x05
00131
00133 #define MAX_EP_PER_INTERFACE 2
00134
00136 #define MAX_INTERFACE_FOR_DEVICE 3
00137
00139 #define MAX_DEVICE_IN_USB_TREE 1
00140
00141 #define SAVE_INTERRUPT_PIPE_FOR_DMS_INTERFACE ENABLE
00142
00144 #if (MAX_DEVICE_IN_USB_TREE>1)
00145 #define USB_HUB_SUPPORT ENABLE
00146 #define USB_MAX_HUB_NUMBER 4
00147 #define HUB_MAX_NB_PORT 4
00148 #else
00149 #define USB_HUB_SUPPORT DISABLE
00150 #endif
00151
00155 #define HOST_STRICT_VID_PID_TABLE DISABLE
00156
00158 #define HOST_AUTO_CFG_ENDPOINT ENABLE
00159
00161 #define HOST_CONTINUOUS_SOF_INTERRUPT DISABLE
00162
00164 #define HOST_ERROR_RESTART ENABLE
00165
00167 #define USB_HOST_PIPE_INTERRUPT_TRANSFER ENABLE
00168
00170 #define ID_PIN_CHANGE_GENERATE_RESET ENABLE
00171
00173 #define TIMEOUT_DELAY_ENABLE ENABLE
00174
00176 #define TIMEOUT_DELAY 10
00177
00179 #define NAK_TIMEOUT_ENABLE DISABLE
00180
00182 #define NAK_SEND_TIMEOUT 0x0FFF
00183
00185 #define NAK_RECEIVE_TIMEOUT 0x0FFF
00186
00188 #define SOFTWARE_VBUS_CTRL ENABLE
00189
00190 #if (HOST_AUTO_CFG_ENDPOINT==FALSE)
00192 #define User_configure_endpoint()
00193 #endif
00194
00198
00199
00200 #define Usb_id_transition_action()
00201 #define Host_device_disconnection_action()
00202 #define Host_device_connection_action()
00203 #define Host_sof_action()
00204 #define Host_suspend_action()
00205 #define Host_hwup_action()
00206 #define Host_device_not_supported_action()
00207 #define Host_device_class_not_supported_action()
00208 #define Host_device_supported_action()
00209 #define Host_device_error_action()
00211
00212
00214
00215
00216
00217
00221
00222 #define USB_DEVICE_SN_USE DISABLE // DISABLE
00223 #define USE_DEVICE_SN_UNIQUE DISABLE // ignore if USB_DEVICE_SN_USE = DISABLE
00224
00225
00226 #define Usb_unicode(a) ((U16)(a))
00227
00231
00232
00233 #define Usb_sof_action()
00234 #define Usb_wake_up_action()
00235 #define Usb_resume_action()
00236 #define Usb_suspend_action()
00237 #define Usb_reset_action()
00238 #define Usb_vbus_on_action()
00239 #define Usb_vbus_off_action()
00240 #define Usb_set_configuration_action()
00242
00244
00245
00247
00248 #endif // _CONF_USB_H_