Nut/OS  4.10.3
API Reference
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 
00052 
00055 #define UDP_NUM_OFF         0x00000000  
00056 #define UDP_NUM (UDP_BASE + UDP_NUM_OFF) 
00057 #define UDP_FRM_NUM         0x000007FF  
00058 #define UDP_FRM_NUM_LSB             0   
00059 #define UDP_FRM_ERR         _BV(16)     
00060 #define UDP_FRM_OK          _BV(17)     
00062 
00063 
00065 #define UDP_GLB_STAT_OFF    0x00000004  
00066 #define UDP_GLB_STAT (UDP_BASE + UDP_GLB_STAT_OFF) 
00067 #define UDP_FADDEN              _BV(0)  
00068 #define UDP_CONFG               _BV(1)  
00069 #define UDP_ESR                 _BV(2)  
00070 #define UDP_RSMINPR             _BV(3)  
00071 #define UDP_RMWUPE              _BV(4)  
00073 
00074 
00076 #define UDP_FADDR_OFF       0x00000008  
00077 #define UDP_FADDR (UDP_BASE + UDP_FADDR_OFF) 
00078 #define UDP_FADD            0x0000007F  
00079 #define UDP_FADD_LSB                0   
00080 #define UDP_FEN                 _BV(8)  
00082 
00083 
00085 #define UDP_IER_OFF         0x00000010  
00086 #define UDP_IER (UDP_BASE + UDP_IER_OFF) 
00087 #define UDP_IDR_OFF         0x00000014  
00088 #define UDP_IDR (UDP_BASE + UDP_IDR_OFF) 
00089 #define UDP_IMR_OFF         0x00000018  
00090 #define UDP_IMR (UDP_BASE + UDP_IMR_OFF) 
00091 #define UDP_ISR_OFF         0x0000001C  
00092 #define UDP_ISR (UDP_BASE + UDP_ISR_OFF) 
00093 #define UDP_ICR_OFF         0x00000020  
00094 #define UDP_ICR (UDP_BASE + UDP_ICR_OFF) 
00095 #define UDP_EPINT(n)            _BV(n)  
00096 #define UDP_RXSUSP              _BV(8)  
00097 #define UDP_RXRSM               _BV(9)  
00098 #define UDP_EXTRSM              _BV(10) 
00099 #define UDP_SOFINT              _BV(11) 
00100 #define UDP_ENDBUSRES           _BV(12) 
00101 #define UDP_WAKEUP              _BV(13) 
00103 
00104 
00106 #define UDP_RST_EP_OFF      0x00000028  
00107 #define UDP_RST_EP (UDP_BASE + UDP_RST_EP_OFF) 
00109 #define UDP_EP(n)           _BV(n)      
00111 
00112 
00114 #define UDP_CSR_OFF         0x00000030  
00115 #define UDP_CSR(n) (UDP_BASE + UDP_CSR_OFF + (n) * 4) 
00117 #define UDP_TXCOMP              _BV(0)  
00118 #define UDP_RX_DATA_BK0         _BV(1)  
00119 #define UDP_RXSETUP             _BV(2)  
00120 #define UDP_STALLSEND_ISOERROR  _BV(3)  
00121 #define UDP_TXPKTRDY            _BV(4)  
00122 #define UDP_FORCESTALL          _BV(5)  
00123 #define UDP_RX_DATA_BK1         _BV(6)  
00124 #define UDP_DIR                 _BV(7)  
00125 #define UDP_EPTYPE          (0x7 << 8)  
00126 #define UDP_EPTYPE_CTRL     (0x0 << 8)  
00127 #define UDP_EPTYPE_ISO_OUT  (0x1 << 8)  
00128 #define UDP_EPTYPE_BULK_OUT (0x2 << 8)  
00129 #define UDP_EPTYPE_INT_OUT  (0x3 << 8)  
00130 #define UDP_EPTYPE_ISO_IN   (0x5 << 8)  
00131 #define UDP_EPTYPE_BULK_IN  (0x6 << 8)  
00132 #define UDP_EPTYPE_INT_IN   (0x7 << 8)  
00133 #define UDP_DTGLE               _BV(11) 
00134 #define UDP_EPEDS               _BV(15) 
00135 #define UDP_RXBYTECNT     (0x7FF << 16) 
00136 #define UDP_RXBYTECNT_LSB           16  
00138 
00139 
00141 #define UDP_FDR_OFF         0x00000050  
00142 #define UDP_FDR(n) (UDP_BASE + UDP_FDR_OFF + (n) * 4) 
00143 #define UDP_FIFO_DATA       0x000000FF  
00144 #define UDP_FIFO_DATA_LSB           0   
00146 
00147 
00149 #define UDP_TXVC_OFF        0x00000074  
00150 #define UDP_TXVC (UDP_BASE + UDP_TXVC_OFF) 
00151 #define UDP_TXVDIS              _BV(8)  
00152 #define UDP_PUON                _BV(9)  
00154 
00155 
00157 #endif /* _ARCH_ARM_AT91_UDP_H_ */