Tse_mac_raw_send(), Tse_mac_raw_send() -8 – Altera Triple Speed Ethernet MegaCore Function User Manual

Page 187

Advertising
background image

Details

<

triple_speed_ethernet_iniche.h

>

Include:

The

tse_mac_close()

closes the Triple-Speed Ethernet driver by performing the

following operations:

• Configure the admin and operation status of the NET structure of the Triple-

Speed Ethernet driver instance to

ALTERA_TSE_ADMIN_STATUS_DOWN

.

• De-register the SGDMA RX interrupt from the operating system.
• Clear the RX_ENA bit in the command_config register to disable the RX

datapath.

Description:

iface

—The index of the MAC interface. This argument is reserved for configura-

tions that contain multiple MAC instances.

Parameter:

SUCCESS

if the close operations are successful. An error code if de-registration of

SGDMA RX from the operating system failed.

Return:

triple_speed_ethernet_init()

See also:

tse_mac_raw_send()

Details

int tse_mac_raw_send(NET net, char *data, unsigned data_bytes)

Prototype:

No

Thread-safe:

No

Available from ISR:

<

triple_speed_ethernet_iniche.h

>

Include:

The

tse_mac_raw_send()

function sends Ethernet frames data to the MAC

function. It validates the arguments to ensure the data length is greater than the
ethernet header size specified by

ALTERA_TSE_MIN_MTU_SIZE

. The function also

ensures the SGDMA TX engine is not busy prior to constructing the descriptor
for the current transmit operation.

Upon successful validations, this function calls the internal API,

tse_mac_

sTxWrite,

to initiate the synchronous SGDMA transmit operation on the current

data buffer.

Description:

net

—The NET structure of the Triple-Speed Ethernet MAC instance.

data

—A

data pointer to the base of the Ethernet frame data, including the header, to be
transmitted to the MAC. The data pointer is assumed to be word-aligned.

data_

bytes

—The total number of bytes in the Ethernet frame including the additional

padding bytes as specified by ETHHDR_BIAS.

Parameter:

SUCCESS

if the current data buffer is successfully transmitted.

SEND_DROPPED

if the number of data bytes is less than the Ethernet header size.

ENP_RESOURCE

if the SGDMA TX engine is busy.

Return:

Software Programming Interface

Altera Corporation

Send Feedback

UG-01008

tse_mac_raw_send()

11-8

2014.06.30

Advertising