1 #ifndef NETARM_ETH_DRV_H
2 #define NETARM_ETH_DRV_H
4 //====================================================================
8 // Device I/O - Description of NET+ARM ethernet hardware functions
11 // ====================================================================
12 //####ECOSGPLCOPYRIGHTBEGIN####
13 // -------------------------------------------
14 // This file is part of eCos, the Embedded Configurable Operating System.
15 // Copyright (C) 2005 eCosCentric LTD
17 // eCos is free software; you can redistribute it and/or modify it under
18 // the terms of the GNU General Public License as published by the Free
19 // Software Foundation; either version 2 or (at your option) any later version.
21 // eCos is distributed in the hope that it will be useful, but WITHOUT ANY
22 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
23 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
26 // You should have received a copy of the GNU General Public License along
27 // with eCos; if not, write to the Free Software Foundation, Inc.,
28 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
30 // As a special exception, if other files instantiate templates or use macros
31 // or inline functions from this file, or you compile this file and link it
32 // with other works to produce a work based on this file, this file does not
33 // by itself cause the resulting work to be covered by the GNU General Public
34 // License. However the source code for this file must still be made available
35 // in accordance with section (3) of the GNU General Public License.
37 // This exception does not invalidate any other reasons why a work based on
38 // this file might be covered by the GNU General Public License.
39 // ====================================================================
40 //#####DESCRIPTIONBEGIN####
42 // Author(s): Harald Brandl (harald.brandl@fh-joanneum.at)
43 // Contributors: Harald Brandl
45 // Purpose: Internal interfaces and data structures
48 //####DESCRIPTIONEND####
50 // ====================================================================
56 unsigned char *RxBuffer;
57 unsigned short key_head, key_tail;
58 unsigned KeyBuffer[MaxKeys];
68 static bool netarm_init(struct cyg_netdevtab_entry *tab);
70 static void netarm_recv(struct eth_drv_sc *sc, struct eth_drv_sg *sg_list,
72 static void netarm_deliver(struct eth_drv_sc *sc);
73 static int netarm_can_send(struct eth_drv_sc *sc);
74 static void netarm_send(struct eth_drv_sc *sc, struct eth_drv_sg *sg_list,
75 int sg_len, int total_len, unsigned long key);
76 static void netarm_start(struct eth_drv_sc *sc, unsigned char *enaddr, int flags);
77 static void netarm_stop(struct eth_drv_sc *sc);
78 static int netarm_control(struct eth_drv_sc *sc, unsigned long key, void *data,
80 static void netarm_poll(struct eth_drv_sc *sc);
81 static int netarm_int_vector(struct eth_drv_sc *sc);
83 static void SetMAC(unsigned char *esa);
85 #endif //NETARM__ETH_DRV_H