conf_usb.h

Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 #ifndef _CONF_USB_H_
00015 #define _CONF_USB_H_
00016 
00020 
00021 
00022    // _________________ USB MODE CONFIGURATION ____________________________
00023    //
00028 
00032       #define USB_HOST_FEATURE            DISABLED
00033 
00037       #define USB_DEVICE_FEATURE          ENABLED
00038 
00040 
00041    // _________________ USB REGULATOR CONFIGURATION _______________________
00042    //
00045 
00050 #ifndef USE_USB_PADS_REGULATOR
00051    #define USE_USB_PADS_REGULATOR   ENABLE      // Possible values ENABLE or DISABLE
00052 #endif
00053 
00054 
00055    // _________________ HOST MODE CONFIGURATION ____________________________
00056    //
00060 
00061    #define HID_CLASS          0x03
00062    #define MS_CLASS           0x08
00063 
00072    #define VID_PID_TABLE            {0x03EB, 2, 0x201C, 0x2014 \
00073                                     ,0x0123, 3, 0x2000, 0x2100, 0x1258}
00074 
00085    #define CLASS_SUBCLASS_PROTOCOL     {0x0A, 0x00, 0x00, \
00086                                        0x00, 0x00, 0x00,\
00087                                        0xFF,0x00,0x00}
00088 
00090    #define SIZEOF_DATA_STAGE        250
00091 
00093    #define DEVICE_ADDRESS           0x05
00094 
00098    #define HOST_STRICT_VID_PID_TABLE      DISABLE
00099 
00101    #define HOST_AUTO_CFG_ENDPOINT         ENABLE
00102 
00104    #define HOST_CONTINUOUS_SOF_INTERRUPT  DISABLE
00105 
00107    #define HOST_ERROR_RESTART             ENABLE
00108 
00110    #define ID_PIN_CHANGE_GENERATE_RESET   DISABLE
00111 
00113    #define NAK_TIMEOUT_DELAY              1
00114 
00115    #if (HOST_AUTO_CFG_ENDPOINT==FALSE)
00116 
00117       #define        User_configure_endpoint()
00118    #endif
00119 
00123    // write here the action to associate to each USB host event
00124    // be carefull not to waste time in order not disturbing the functions
00125    #define Usb_id_transition_action()
00126    #define Host_device_disconnection_action()
00127    #define Host_device_connection_action()
00128    #define Host_sof_action()
00129    #define Host_suspend_action()                      host_suspend_action();
00130    #define Host_hwup_action()
00131    #define Host_device_not_supported_action()
00132    #define Host_device_supported_action()
00133    #define Host_device_error_action()
00134 
00135 
00136 extern void host_suspend_action(void);
00138 
00139 
00140 // _________________ DEVICE MODE CONFIGURATION __________________________
00141 
00145       
00146 #define Usb_unicode(a)        ((U16)(a))      
00147 
00148 #define NB_ENDPOINTS          2  // number of endpoints in the application
00149 #define EP_HID_IN             1
00150 #define EP_HID_OUT            2
00151 
00152 
00153 
00157    // write here the action to associate to each USB event
00158    // be carefull not to waste time in order not disturbing the functions
00159 #define Usb_sof_action()         sof_action();
00160 #define Usb_wake_up_action()
00161 #define Usb_resume_action()
00162 #define Usb_suspend_action()
00163 #define Usb_reset_action()
00164 #define Usb_vbus_on_action()
00165 #define Usb_vbus_off_action()
00166 #define Usb_set_configuration_action()
00167 
00168 
00169 extern void sof_action(void);
00171 
00173 
00174 #endif // _CONF_USB_H_

Generated on Fri Mar 17 16:02:03 2006 for Atmel by  doxygen 1.4.6-NO