Xemu [doxygen]  hyppo 0a42be3a057156924bc1b626a687bd6e27349c45 @ Sat 19 Mar 02:15:11 CET 2022
Macros | Functions
ethernet65.c File Reference
#include "xemu/emutools.h"
#include "xemu/ethertap.h"
#include "ethernet65.h"
Include dependency graph for ethernet65.c:

Go to the source code of this file.

Macros

#define ETH_FRAME_MAX_SIZE   1536
 
#define ETH_FRAME_MIN_SIZE   60
 
#define SELECT_WAIT_USEC_MAX   10000
 
#define SELECT_WAIT_USEC_MIN   5
 
#define SELECT_WAIT_INC_VAL   5
 
#define ETH_II_FRAME_ARP   0x0806
 
#define ETH_II_FRAME_IPV4   0x0800
 
#define ETHDEBUG(...)
 
#define RX_IRQ_ON()   do { eth65._rx_irq = 0x20; __eth65_manage_irq_for_cpu(); } while (0)
 
#define RX_IRQ_OFF()   do { eth65._rx_irq = 0; __eth65_manage_irq_for_cpu(); } while (0)
 
#define TX_IRQ_ON()   do { eth65._tx_irq = 0x10; __eth65_manage_irq_for_cpu(); } while (0)
 
#define TX_IRQ_OFF()   do { eth65._tx_irq = 0; __eth65_manage_irq_for_cpu(); } while (0)
 

Functions

Uint8 eth65_read_reg (int addr)
 
void eth65_write_reg (int addr, Uint8 data)
 
Uint8 eth65_read_rx_buffer (int offset)
 
void eth65_write_tx_buffer (int offset, Uint8 data)
 
void eth65_shutdown (void)
 
void eth65_reset (void)
 
int eth65_init (const char *options)
 

Macro Definition Documentation

◆ ETH_FRAME_MAX_SIZE

#define ETH_FRAME_MAX_SIZE   1536

Definition at line 51 of file ethernet65.c.

◆ ETH_FRAME_MIN_SIZE

#define ETH_FRAME_MIN_SIZE   60

Definition at line 55 of file ethernet65.c.

◆ ETH_II_FRAME_ARP

#define ETH_II_FRAME_ARP   0x0806

Definition at line 65 of file ethernet65.c.

◆ ETH_II_FRAME_IPV4

#define ETH_II_FRAME_IPV4   0x0800

Definition at line 66 of file ethernet65.c.

◆ ETHDEBUG

#define ETHDEBUG (   ...)
Value:
do { \
if (XEMU_UNLIKELY(eth_debug)) { \
DEBUGPRINT(__VA_ARGS__); \
} \
} while (0)

Definition at line 108 of file ethernet65.c.

◆ RX_IRQ_OFF

#define RX_IRQ_OFF ( )    do { eth65._rx_irq = 0; __eth65_manage_irq_for_cpu(); } while (0)

Definition at line 129 of file ethernet65.c.

◆ RX_IRQ_ON

#define RX_IRQ_ON ( )    do { eth65._rx_irq = 0x20; __eth65_manage_irq_for_cpu(); } while (0)

Definition at line 128 of file ethernet65.c.

◆ SELECT_WAIT_INC_VAL

#define SELECT_WAIT_INC_VAL   5

Definition at line 62 of file ethernet65.c.

◆ SELECT_WAIT_USEC_MAX

#define SELECT_WAIT_USEC_MAX   10000

Definition at line 58 of file ethernet65.c.

◆ SELECT_WAIT_USEC_MIN

#define SELECT_WAIT_USEC_MIN   5

Definition at line 61 of file ethernet65.c.

◆ TX_IRQ_OFF

#define TX_IRQ_OFF ( )    do { eth65._tx_irq = 0; __eth65_manage_irq_for_cpu(); } while (0)

Definition at line 131 of file ethernet65.c.

◆ TX_IRQ_ON

#define TX_IRQ_ON ( )    do { eth65._tx_irq = 0x10; __eth65_manage_irq_for_cpu(); } while (0)

Definition at line 130 of file ethernet65.c.

Function Documentation

◆ eth65_init()

int eth65_init ( const char *  options)

Definition at line 560 of file ethernet65.c.

◆ eth65_read_reg()

Uint8 eth65_read_reg ( int  addr)

Definition at line 353 of file ethernet65.c.

Here is the caller graph for this function:

◆ eth65_read_rx_buffer()

Uint8 eth65_read_rx_buffer ( int  offset)

Definition at line 508 of file ethernet65.c.

Here is the caller graph for this function:

◆ eth65_reset()

void eth65_reset ( void  )

Definition at line 542 of file ethernet65.c.

◆ eth65_shutdown()

void eth65_shutdown ( void  )

Definition at line 521 of file ethernet65.c.

◆ eth65_write_reg()

void eth65_write_reg ( int  addr,
Uint8  data 
)

Definition at line 419 of file ethernet65.c.

Here is the caller graph for this function:

◆ eth65_write_tx_buffer()

void eth65_write_tx_buffer ( int  offset,
Uint8  data 
)

Definition at line 514 of file ethernet65.c.

Here is the caller graph for this function:

Variable Documentation

◆ _irq_to_cpu_routed

int _irq_to_cpu_routed

Definition at line 77 of file ethernet65.c.

◆ _rx_irq

int _rx_irq

Definition at line 75 of file ethernet65.c.

◆ _tx_irq

int _tx_irq

Definition at line 76 of file ethernet65.c.

◆ accept_broadcast

int accept_broadcast

Definition at line 87 of file ethernet65.c.

◆ accept_multicast

int accept_multicast

Definition at line 88 of file ethernet65.c.

◆ adjust_txd_phase

int adjust_txd_phase

Definition at line 92 of file ethernet65.c.

◆ disable_crc_chk

int disable_crc_chk

Definition at line 91 of file ethernet65.c.

◆ enabled

int enabled

Definition at line 71 of file ethernet65.c.

◆ exited

int exited

Definition at line 73 of file ethernet65.c.

◆ mac_filter

int mac_filter

Definition at line 89 of file ethernet65.c.

◆ miim_register

int miim_register

Definition at line 93 of file ethernet65.c.

◆ no_reset

int no_reset

Definition at line 72 of file ethernet65.c.

◆ phy_number

int phy_number

Definition at line 94 of file ethernet65.c.

◆ rx_buffer

Uint8 rx_buffer[0x1000]

Definition at line 95 of file ethernet65.c.

◆ rx_buffer_mapped

int rx_buffer_mapped

Definition at line 83 of file ethernet65.c.

◆ rx_buffer_using

int rx_buffer_using

Definition at line 82 of file ethernet65.c.

◆ rx_enabled

int rx_enabled

Definition at line 74 of file ethernet65.c.

◆ rx_irq_enabled

int rx_irq_enabled

Definition at line 80 of file ethernet65.c.

◆ select_wait_usec

int select_wait_usec

Definition at line 85 of file ethernet65.c.

◆ sense_activity

int sense_activity

Definition at line 84 of file ethernet65.c.

◆ tx_buffer

Uint8 tx_buffer[0x0800]

Definition at line 96 of file ethernet65.c.

◆ tx_irq_enabled

int tx_irq_enabled

Definition at line 81 of file ethernet65.c.

◆ tx_size

int tx_size

Definition at line 78 of file ethernet65.c.

◆ tx_trigger

int tx_trigger

Definition at line 79 of file ethernet65.c.

◆ video_streaming

int video_streaming

Definition at line 86 of file ethernet65.c.

◆ xemu_always_filters

int xemu_always_filters

Definition at line 90 of file ethernet65.c.

XEMU_UNLIKELY
#define XEMU_UNLIKELY(__x__)
Definition: emutools_basicdefs.h:125