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 #ifndef _CONF_USB_H_
00041 #define _CONF_USB_H_
00042
00043
00044 #include "modules/usb/usb_commun.h"
00045
00049
00050
00051
00052
00057
00061 #define USB_HOST_FEATURE ENABLED
00062
00066 #define USB_DEVICE_FEATURE DISABLED
00067
00069
00070
00071
00074
00079 #ifndef USE_USB_PADS_REGULATOR
00080 #define USE_USB_PADS_REGULATOR ENABLE // Possible values ENABLE or DISABLE
00081 #endif
00083
00084
00085
00089
00090 #define AUDIO_AC_INTERFACE_CLASS 0x01 // Audio Control Interface
00091 #define AUDIO_AC_INTERFACE_SUB_CLASS 0x01
00092 #define AUDIO_NO_PROTOCOL 0x00
00093 #define AUDIO_AS_INTERFACE_CLASS 0x01 // Audio Stream Interface
00094 #define AUDIO_AS_INTERFACE_SUB_CLASS 0x02
00095 #define AUDIO_NO_PROTOCOL 0x00
00096
00097
00098 #define PIPE_AUDIO_IN pipe_audio_in
00099 extern U8 pipe_audio_in;
00100
00101
00110 #define VID_PID_TABLE {VID_ATMEL, 1, PID_MegaAUDIO_IN}
00111
00122 #define CLASS_SUBCLASS_PROTOCOL { AUDIO_AS_INTERFACE_CLASS, AUDIO_AS_INTERFACE_SUB_CLASS, AUDIO_NO_PROTOCOL, \
00123 AUDIO_AC_INTERFACE_CLASS, AUDIO_AC_INTERFACE_SUB_CLASS, AUDIO_NO_PROTOCOL }
00124
00126 #define SIZEOF_DATA_STAGE 250
00127
00129 #define DEVICE_BASE_ADDRESS 0x05
00130
00132 #define MAX_EP_PER_INTERFACE 3
00133
00135 #define MAX_INTERFACE_FOR_DEVICE 3
00136
00138 #define MAX_DEVICE_IN_USB_TREE 1
00139
00140 #define SAVE_INTERRUPT_PIPE_FOR_DMS_INTERFACE ENABLE
00141
00143 #if (MAX_DEVICE_IN_USB_TREE>1)
00144 #define USB_HUB_SUPPORT ENABLE
00145 #define USB_MAX_HUB_NUMBER 4
00146 #define HUB_MAX_NB_PORT 4
00147 #else
00148 #define USB_HUB_SUPPORT DISABLE
00149 #endif
00150
00154 #define HOST_STRICT_VID_PID_TABLE DISABLE
00155
00157 #define HOST_AUTO_CFG_ENDPOINT ENABLE
00158
00160 #define HOST_CONTINUOUS_SOF_INTERRUPT DISABLE
00161
00163 #define HOST_ERROR_RESTART ENABLE
00164
00166 #define USB_HOST_PIPE_INTERRUPT_TRANSFER ENABLE
00167
00169 #define ID_PIN_CHANGE_GENERATE_RESET ENABLE
00170
00172 #define TIMEOUT_DELAY_ENABLE ENABLE
00173
00175 #define TIMEOUT_DELAY 10
00176
00178 #define NAK_TIMEOUT_ENABLE DISABLE
00179
00181 #define NAK_SEND_TIMEOUT 0x0FFF
00182
00184 #define NAK_RECEIVE_TIMEOUT 0x0FFF
00185
00187 #define SOFTWARE_VBUS_CTRL ENABLE
00188
00189 #if (HOST_AUTO_CFG_ENDPOINT==FALSE)
00191 #define User_configure_endpoint()
00192 #endif
00193
00197
00198
00199 #define Usb_id_transition_action()
00200 #define Host_device_disconnection_action()
00201 #define Host_device_connection_action()
00202 #define Host_sof_action() sof_action()
00203 #define Host_suspend_action()
00204 #define Host_hwup_action()
00205 #define Host_device_not_supported_action()
00206 #define Host_device_class_not_supported_action()
00207 #define Host_device_supported_action()
00208 #define Host_device_error_action()
00209
00210 extern void sof_action(void);
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 #define NB_ENDPOINTS 0 // number of endpoints in the application
00226
00227
00228 #define Usb_unicode(a) ((U16)(a))
00229
00233
00234
00235 #define Usb_sof_action()
00236 #define Usb_wake_up_action()
00237 #define Usb_resume_action()
00238 #define Usb_suspend_action()
00239 #define Usb_reset_action()
00240 #define Usb_vbus_on_action()
00241 #define Usb_vbus_off_action()
00242 #define Usb_set_configuration_action()
00244
00246
00247
00249
00250 #endif // _CONF_USB_H_