SAMV71 Xplained Ultra Software Package 1.5

conf_usb_host.h

Go to the documentation of this file.
00001 /* ---------------------------------------------------------------------------- */
00002 /*                  Atmel Microcontroller Software Support                      */
00003 /*                       SAM Software Package License                           */
00004 /* ---------------------------------------------------------------------------- */
00005 /* Copyright (c) 2015, Atmel Corporation                                        */
00006 /*                                                                              */
00007 /* All rights reserved.                                                         */
00008 /*                                                                              */
00009 /* Redistribution and use in source and binary forms, with or without           */
00010 /* modification, are permitted provided that the following condition is met:    */
00011 /*                                                                              */
00012 /* - Redistributions of source code must retain the above copyright notice,     */
00013 /* this list of conditions and the disclaimer below.                            */
00014 /*                                                                              */
00015 /* Atmel's name may not be used to endorse or promote products derived from     */
00016 /* this software without specific prior written permission.                     */
00017 /*                                                                              */
00018 /* DISCLAIMER:  THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR   */
00019 /* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
00020 /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE   */
00021 /* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,      */
00022 /* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
00023 /* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,  */
00024 /* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF    */
00025 /* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING         */
00026 /* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, */
00027 /* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.                           */
00028 /* ---------------------------------------------------------------------------- */
00029 /**
00030  * \file
00031  *
00032  * \brief USB host configuration file
00033  */
00034 /*
00035  * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
00036  */
00037 
00038 #ifndef _CONF_USB_HOST_H_
00039 #define _CONF_USB_HOST_H_
00040 
00041 #include "compiler.h"
00042 
00043 /**
00044  * USB Host Configuration
00045  * @{
00046  */
00047 
00048 //! Array of UHI APIs Define the list of UHI supported by USB host.
00049 #define USB_HOST_UHI        UHI_MSC
00050 
00051 //! Maximum current allowed on Vbus (mA)
00052 #define USB_HOST_POWER_MAX  500
00053 
00054 //! Authorize the USB HUB support
00055 // #define USB_HOST_HUB_SUPPORT
00056 
00057 //! Authorize the USB host to run in High Speed
00058 
00059 # define USB_HOST_HS_SUPPORT
00060 
00061 /**
00062  * USB Host callbacks
00063  * @{
00064  */
00065 
00066 //! To notify that the USB mode are switched automatically.
00067 //! This is possible only when ID pin is available.
00068 #define UHC_MODE_CHANGE(b_host_mode)        ui_usb_mode_change(b_host_mode)
00069 
00070 //! To notify that the Vbus level has changed
00071 //! Available only in USB hardware with Vbus monitoring.
00072 #define UHC_VBUS_CHANGE(b_present)          ui_usb_vbus_change(b_present)
00073 
00074 //! To notify that a Vbus error has occurred
00075 //! Available only in USB hardware with Vbus monitoring.
00076 #define UHC_VBUS_ERROR()                    ui_usb_vbus_error()
00077 
00078 //! To notify that a device has been connected or disconnected.
00079 #define UHC_CONNECTION_EVENT(dev,b_present) main_usb_connection_event(dev,b_present)
00080 
00081 //! Called when a USB device or the host have wake up the USB line.
00082 #define UHC_WAKEUP_EVENT()                  ui_usb_wakeup_event()
00083 
00084 //! Called for each received SOF each 1 ms
00085 //! Note: Available in High and Full speed mode
00086 #define UHC_SOF_EVENT()                     main_usb_sof_event()
00087 
00088 //! Called when a USB device configuration must be chosen.
00089 //! Thus, the application can choose either a configuration number for this device
00090 //! or a configuration number 0 to reject it.
00091 //! If callback not defined the configuration 1 is chosen.
00092 //#define UHC_DEVICE_CONF(dev)                uint8_t usb_device_conf(dev)
00093 
00094 //! Called when a USB device enumeration is completed.
00095 #define UHC_ENUM_EVENT(dev,b_status)        ui_usb_enum_event(dev,b_status)
00096 
00097 
00098 //@}
00099 
00100 
00101 
00102 /**
00103  * USB Interface Configuration
00104  * @{
00105  */
00106 /**
00107  * Configuration of MSC interface
00108  * @{
00109  */
00110 #define UHI_MSC_CHANGE(dev,b_plug)
00111 //@}
00112 //@}
00113 
00114 //@}
00115 
00116 #include "uhi_msc.h"
00117 #include "uhi_msc_mem.h"
00118 #include "ui.h"
00119 #include "main.h"
00120 
00121 #endif // _CONF_USB_HOST_H_
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines