Allocate a receive buffer set
Attaches a set of receive buffers to the designated RX endpoint for use by the DMA engine to Ethernet frames. This call should be made only once at initialization time and number of receive buffers should not be changed during active reception of frames.
The receive buffer set must be allocated by mhpeAllocateReceiveBufferSet to make the application compatible across different Network Devices.
The buffer_count field of the HPERXBUFFERSET structure should be initialized to the number of elements in the set. Each element of the buffer set should be initialized so that the ptr and size fields of each HPEBUFFER element are initialized to point to each memory buffer to be used for receive frames. The other fields are for internal use.
The DMA engine will use the receive buffers cyclically. Before any receive buffer can be reused for a received frame a call to hpeGetReceiveBuffer must be made referring to that buffer.
HPESTATUS mhpeAllocateReceiveBufferSet( MHPEHANDLE ephandle,
MHPERXBUFFERSET **rx_buffer_set,
uint32_t buffer_count,
uint32_t buffer_size
);
ephandle
rx_buffer_set
buffer_count
buffer_size
A HPESTATUS value indicating the success or failure of the operation.
E_OK
E_EXIST
E_INVALID_ADDR
E_PARAM
E_STATE
E_LIMIT
E_ALIGNMENT
Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 7.1 | intime/rt/include/mhpeif.h | mhpeif.h | mhpeif.lib |