metalsvm/drivers/net/rckemac.h

60 lines
1.5 KiB
C
Raw Permalink Normal View History

2011-06-27 11:40:37 +02:00
/*
* Copyright 2011 Stefan Lankes, Chair for Operating Systems,
* RWTH Aachen University
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This file is part of MetalSVM.
*/
#ifndef __HAVE_RCKEMAC_H__
#define __HAVE_RCKEMAC_H__
#include <metalsvm/stddef.h>
#if defined(CONFIG_LWIP) && defined(CONFIG_ROCKCREEK)
2011-10-08 23:09:51 -07:00
#include <lwip/err.h>
#include <lwip/netif.h>
2011-06-27 11:40:37 +02:00
/*
* Helper struct to hold private data used to operate your ethernet interface.
*/
typedef struct rckemacif {
struct eth_addr *ethaddr;
/* Add whatever per-interface state that is needed here. */
uint8_t* rx_buffer;
uint32_t rx_buffer_max;
uint32_t rx_read_offset;
uint8_t* tx_buffer;
2011-10-09 13:02:18 -07:00
uint32_t tx_buffer_max;
uint32_t tx_write_offset;
2011-06-27 11:40:37 +02:00
uint32_t core;
uint32_t num_emac;
volatile uint8_t polling;
2011-06-27 11:40:37 +02:00
} rckemacif_t;
/*
* Initialize the eMAC network driver
*/
err_t rckemacif_init(struct netif* netif);
2011-10-08 23:09:51 -07:00
/*
* global interrupt handler uses this helper handler
*/
void rckemacif_handler(struct state* s, uint32_t status);
2011-06-27 11:40:37 +02:00
#endif
#endif