Daniel Krueger | 9d7164c | 2008-12-19 11:41:57 -0800 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | |
| 3 | (c) SYSTEC electronic GmbH, D-07973 Greiz, August-Bebel-Str. 29 |
| 4 | www.systec-electronic.com |
| 5 | |
| 6 | Project: openPOWERLINK |
| 7 | |
| 8 | Description: interface for ethernetdriver |
| 9 | "fast ethernet controller" (FEC) |
| 10 | freescale coldfire MCF528x and compatible FEC |
| 11 | |
| 12 | License: |
| 13 | |
| 14 | Redistribution and use in source and binary forms, with or without |
| 15 | modification, are permitted provided that the following conditions |
| 16 | are met: |
| 17 | |
| 18 | 1. Redistributions of source code must retain the above copyright |
| 19 | notice, this list of conditions and the following disclaimer. |
| 20 | |
| 21 | 2. Redistributions in binary form must reproduce the above copyright |
| 22 | notice, this list of conditions and the following disclaimer in the |
| 23 | documentation and/or other materials provided with the distribution. |
| 24 | |
| 25 | 3. Neither the name of SYSTEC electronic GmbH nor the names of its |
| 26 | contributors may be used to endorse or promote products derived |
| 27 | from this software without prior written permission. For written |
| 28 | permission, please contact info@systec-electronic.com. |
| 29 | |
| 30 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 31 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 32 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 33 | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
| 34 | COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 35 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
| 36 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 37 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 38 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 39 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN |
| 40 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 41 | POSSIBILITY OF SUCH DAMAGE. |
| 42 | |
| 43 | Severability Clause: |
| 44 | |
| 45 | If a provision of this License is or becomes illegal, invalid or |
| 46 | unenforceable in any jurisdiction, that shall not affect: |
| 47 | 1. the validity or enforceability in that jurisdiction of any other |
| 48 | provision of this License; or |
| 49 | 2. the validity or enforceability in other jurisdictions of that or |
| 50 | any other provision of this License. |
| 51 | |
| 52 | ------------------------------------------------------------------------- |
| 53 | |
| 54 | $RCSfile: EdrvFec.h,v $ |
| 55 | |
| 56 | $Author: D.Krueger $ |
| 57 | |
| 58 | $Revision: 1.3 $ $Date: 2008/04/17 21:36:32 $ |
| 59 | |
| 60 | $State: Exp $ |
| 61 | |
| 62 | Build Environment: |
| 63 | Dev C++ and GNU-Compiler for m68k |
| 64 | |
| 65 | ------------------------------------------------------------------------- |
| 66 | |
| 67 | Revision History: |
| 68 | |
| 69 | 2005/08/01 m.b.: start of implementation |
| 70 | |
| 71 | ****************************************************************************/ |
| 72 | |
| 73 | #ifndef _EDRVFEC_H_ |
| 74 | #define _EDRVFEC_H_ |
| 75 | |
Daniel Krueger | 9d7164c | 2008-12-19 11:41:57 -0800 | [diff] [blame] | 76 | //--------------------------------------------------------------------------- |
| 77 | // const defines |
| 78 | //--------------------------------------------------------------------------- |
| 79 | // do this in config header |
| 80 | #define TARGET_HARDWARE TGTHW_SPLC_CF54 |
| 81 | |
Daniel Krueger | 9d7164c | 2008-12-19 11:41:57 -0800 | [diff] [blame] | 82 | // base addresses |
| 83 | #if ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5282) |
| 84 | |
Daniel Krueger | 9d7164c | 2008-12-19 11:41:57 -0800 | [diff] [blame] | 85 | #elif ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5485) |
| 86 | |
Daniel Krueger | 9d7164c | 2008-12-19 11:41:57 -0800 | [diff] [blame] | 87 | #else |
| 88 | |
Greg Kroah-Hartman | e0ca059 | 2008-12-19 17:09:38 -0800 | [diff] [blame] | 89 | #error 'ERROR: Target was never implemented!' |
Daniel Krueger | 9d7164c | 2008-12-19 11:41:57 -0800 | [diff] [blame] | 90 | |
| 91 | #endif |
| 92 | |
Daniel Krueger | 9d7164c | 2008-12-19 11:41:57 -0800 | [diff] [blame] | 93 | //--------------------------------------------------------------------------- |
| 94 | // types |
| 95 | //--------------------------------------------------------------------------- |
| 96 | |
Daniel Krueger | 9d7164c | 2008-12-19 11:41:57 -0800 | [diff] [blame] | 97 | // Rx and Tx buffer descriptor format |
Greg Kroah-Hartman | e0ca059 | 2008-12-19 17:09:38 -0800 | [diff] [blame] | 98 | typedef struct { |
| 99 | WORD m_wStatus; // control / status --- used by edrv, do not change in application |
| 100 | WORD m_wLength; // transfer length |
| 101 | BYTE *m_pbData; // buffer address |
Daniel Krueger | 9d7164c | 2008-12-19 11:41:57 -0800 | [diff] [blame] | 102 | } tBufferDescr; |
| 103 | |
| 104 | #if ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5282) |
| 105 | |
| 106 | #elif ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5485) |
| 107 | |
| 108 | #endif |
| 109 | |
| 110 | //--------------------------------------------------------------------------- |
| 111 | // function prototypes |
| 112 | //--------------------------------------------------------------------------- |
| 113 | |
Greg Kroah-Hartman | e0ca059 | 2008-12-19 17:09:38 -0800 | [diff] [blame] | 114 | #endif // #ifndef _EDRV_FEC_H_ |