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
);
ephandlerx_buffer_setbuffer_countbuffer_sizeA HPESTATUS value indicating the success or failure of the operation.
E_OKE_EXISTE_INVALID_ADDRE_PARAME_STATEE_LIMITE_ALIGNMENT| Versions | Defined in | Include | Link to |
|---|---|---|---|
| INtime 7.1 | intime/rt/include/mhpeif.h | mhpeif.h | mhpeif.lib |