at91_udp.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2007 by Ole Reinhardt, EmbeddedIT. ole.reinhardt@embedded-it.de
00003  * All rights reserved.
00004  *
00005  * This file is based on at91_udp.h 
00006  * (c) Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
00007  *
00008  * Redistribution and use in source and binary forms, with or without
00009  * modification, are permitted provided that the following conditions
00010  * are met:
00011  *
00012  * 1. Redistributions of source code must retain the above copyright
00013  *    notice, this list of conditions and the following disclaimer.
00014  * 2. Redistributions in binary form must reproduce the above copyright
00015  *    notice, this list of conditions and the following disclaimer in the
00016  *    documentation and/or other materials provided with the distribution.
00017  * 3. Neither the name of the copyright holders nor the names of
00018  *    contributors may be used to endorse or promote products derived
00019  *    from this software without specific prior written permission.
00020  *
00021  * THIS SOFTWARE IS PROVIDED BY EMBEDDED-IT AND CONTRIBUTORS
00022  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00023  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00024  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EMBEDDED-IT
00025  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
00026  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 
00027  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 
00028  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
00029  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
00030  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
00031  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00032  *
00033  * For additional information see http://www.ethernut.de/
00034  */
00035 
00036 #ifndef _ARCH_ARM_AT91_UDP_H_
00037 #define _ARCH_ARM_AT91_UDP_H_
00038 
00059 
00062 #define UDP_NUM_OFF      0x00000000
00063 #define UDP_NUM          (UDP_BASE + UDP_NUM_OFF)
00064 #define UDP_FRM_NUM      (0x07FF <<  0) 
00065 #define UDP_FRM_ERR      _BV(16)        
00066 #define UDP_FRM_OK       _BV(17)        
00068 
00069 
00071 #define UDP_GLBSTATE_OFF 0x00000004
00072 #define UDP_GLBSTATE     (UDP_BASE + UDP_GLBSTATE_OFF)
00073 #define UDP_FADDEN       _BV(0)         
00074 #define UDP_CONFG        _BV(1)         
00075 /* TODO: Not defined in datasheet for AT91SAM7X... */
00076 //#define UDP_ESR          _BV(2)         /*!< \brief Enable Send Resume */
00077 //#define UDP_RSMINPR      _BV(3)         /*!< \brief A Resume Has Been Sent to the Host */
00078 //#define UDP_RMWUPE       _BV(4)         /*!< \brief Remote Wake Up Enable */
00083 #define UDP_FADDR_OFF    0x00000008
00084 #define UDP_FADDR        (UDP_BASE + UDP_FADDR_OFF)
00085 #define UDP_FADD         (0x7F << 0)    
00086 #define UDP_FEN          _BV(8)         
00088 
00089 
00091 #define UDP_IER_OFF      0x00000010 
00092 #define UDP_IER          (UDP_BASE + UDP_IER_OFF)
00093 
00094 #define UDP_EPINT0       _BV( 0)        
00095 #define UDP_EPINT1       _BV( 1)        
00096 #define UDP_EPINT2       _BV( 2)        
00097 #define UDP_EPINT3       _BV( 3)        
00098 #define UDP_EPINT4       _BV( 4)        
00099 #define UDP_EPINT5       _BV( 5)        
00100 #define UDP_RXSUSP       _BV( 8)        
00101 #define UDP_RXRSM        _BV( 9)        
00102 #define UDP_EXTRSM       _BV(10)        
00103 #define UDP_SOFINT       _BV(11)        
00104 #define UDP_ENDBUSRES    _BV(12)        
00105 #define UDP_WAKEUP       _BV(13)        
00107 
00108 
00110 #define UDP_IDR_OFF      0x00000014
00111 #define UDP_IDR          (UDP_BASE + UDP_IDR_OFF)
00112 
00116 #define UDP_IMR_OFF      0x00000018
00117 #define UDP_IMR          (UDP_BASE + UDP_IMR_OFF)
00118 
00122 #define UDP_ISR_OFF      0x0000001C
00123 #define UDP_ISR          (UDP_BASE + UDP_ISR_OFF)
00124 
00128 #define UDP_ICR_OFF      0x00000020
00129 #define UDP_ICR          (UDP_BASE + UDP_ICR_OFF)
00130 
00134 #define UDP_RST_EP_OFF   0x00000028
00135 #define UDP_RST_EP       (UDP_BASE + UDP_RST_EP_OFF)
00136 
00137 #define UDP_EP0          _BV(0)          
00138 #define UDP_EP1          _BV(1)          
00139 #define UDP_EP2          _BV(2)          
00140 #define UDP_EP3          _BV(3)          
00141 #define UDP_EP4          _BV(4)          
00142 #define UDP_EP5          _BV(5)          
00144 
00145 
00147 #define UDP_CSR_OFF      0x00000030
00148 #define UDP_CSR          (UDP_BASE + UDP_CSR_OFF)
00149 #define UDP_EP0_CSR      (UDP_CSR + 0x00000000)  
00150 #define UDP_EP1_CSR      (UDP_CSR + 0x00000004)  
00151 #define UDP_EP2_CSR      (UDP_CSR + 0x00000008)  
00152 #define UDP_EP3_CSR      (UDP_CSR + 0x0000000C)  
00153 #define UDP_EP4_CSR      (UDP_CSR + 0x00000010)  
00154 #define UDP_EP5_CSR      (UDP_CSR + 0x00000014)  
00156 #define UDP_TXCOMP       _BV(0)         
00157 #define UDP_RX_DATA_BK0  _BV(1)         
00158 #define UDP_RXSETUP      _BV(2)         
00159 #define UDP_STALL_SEND_ISOERROR _BV(3)  
00160 #define UDP_TXPKTRDY     _BV(4)         
00161 #define UDP_FORCESTALL   _BV(5)         
00162 #define UDP_RX_DATA_BK1  _BV(6)         
00163 #define UDP_DIR          _BV(7)         
00164 #define UDP_EPTYPE       (0x7 << 8)     
00165 #define     UDP_EPTYPE_CTRL      (0x0 << 8) 
00166 #define     UDP_EPTYPE_ISO_OUT   (0x1 << 8) 
00167 #define     UDP_EPTYPE_BULK_OUT  (0x2 << 8) 
00168 #define     UDP_EPTYPE_INT_OUT   (0x3 << 8) 
00169 #define     UDP_EPTYPE_ISO_IN    (0x5 << 8) 
00170 #define     UDP_EPTYPE_BULK_IN   (0x6 << 8) 
00171 #define     UDP_EPTYPE_INT_IN    (0x7 << 8) 
00172 #define UDP_DTGLE       _BV(11)         
00173 #define UDP_EPEDS       _BV(15)         
00174 #define UDP_RXBYTECNT   (0x7FF << 16)   
00176 
00177 
00179 #define UDP_FDR_OFF      0x00000050
00180 #define UDP_FDR          (UDP_BASE + UDP_FDR_OFF)
00181 #define UDP_EP0_FDR      (UDP_FDR + 0x00000000)  
00182 #define UDP_EP1_FDR      (UDP_FDR + 0x00000004)  
00183 #define UDP_EP2_FDR      (UDP_FDR + 0x00000008)  
00184 #define UDP_EP3_FDR      (UDP_FDR + 0x0000000C)  
00185 #define UDP_EP4_FDR      (UDP_FDR + 0x00000010)  
00186 #define UDP_EP5_FDR      (UDP_FDR + 0x00000014)  
00188 
00189 
00191 #define UDP_TXVC_OFF     0x00000074
00192 #define UDP_TXVC         (UDP_BASE + UDP_TXVDIS_OFF)
00193 #define UDB_TXVDIS       _BV(8)         
00195 
00196 
00198 #endif                          /* _ARCH_ARM_AT91_UDP_H_ */

© 2000-2007 by egnite Software GmbH - visit http://www.ethernut.de/