ne2.h
来自「AMLOGIC DPF source code」· C头文件 代码 · 共 45 行
H
45 行
/*******************************************************************
*
* Copyright C 2004 by Amlogic, Inc. All Rights Reserved.
*
* Description: Declarations for NE2000 compatible driver
*
* Created: Wed Oct 27 16:34:38 2004, Eric Knudstrup
*
*******************************************************************/
#ifndef NE2_H
#define NE2_H
#include <includes.h>
#include "lwip/opt.h"
#include <lwip/netif.h>
/* Number of TX buffers */
#define TX_BUFFER_COUNT 2
/* Number of pages to reserve for each TX buffer */
#define TX_BUFFER_N_PAGES 6
struct ne2_tx_buffer {
u8_t start_page;
u16_t length;
};
struct ne2_if {
struct netif ne2_netif;
sys_sem_t ne2_if_sem; /* Interrupt uses this to poke the interface task awake */
OS_EVENT *ne2_if_mutex; /* Make sure only one task can access the chip at the same time */
struct ne2_tx_buffer ne2_tx_buf[TX_BUFFER_COUNT];
s8_t ne2_started; /* Buffer currently being sent by the chip */
volatile u8_t *ne2_base_address;
u8_t ne2_tx_start_page;
u8_t ne2_rx_start_page;
u8_t ne2_stop_page;
u8_t ne2_current_page; /* Current read page */
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?