59 lines
1.5 KiB
C
59 lines
1.5 KiB
C
/*
|
|
* 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)
|
|
|
|
#include <lwip/err.h>
|
|
#include <lwip/netif.h>
|
|
|
|
/*
|
|
* 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;
|
|
uint32_t tx_buffer_max;
|
|
uint32_t tx_write_offset;
|
|
uint32_t core;
|
|
uint32_t num_emac;
|
|
volatile uint8_t polling;
|
|
} rckemacif_t;
|
|
|
|
/*
|
|
* Initialize the eMAC network driver
|
|
*/
|
|
err_t rckemacif_init(struct netif* netif);
|
|
|
|
/*
|
|
* global interrupt handler uses this helper handler
|
|
*/
|
|
void rckemacif_handler(struct state* s, uint32_t status);
|
|
|
|
#endif
|
|
|
|
#endif
|