![]() |
WE310F5
39.00.000
|
This section describes the M2MB APIs to perform various SDIO slave operations. More...
This section describes the M2MB APIs to perform various SDIO slave operations.
#define M2MB_MBOX_BLOCK_SIZE 256 |
MBOX block size
Definition at line 63 of file m2mb_sdio_slave.h.
#define M2MB_MBOX_MAX_TX_SIZE 256 |
MBOX maximum transmit size
Definition at line 74 of file m2mb_sdio_slave.h.
#define M2MB_MBOX_MSG_HDR_SIZE (2) |
MBOX message header size
Definition at line 64 of file m2mb_sdio_slave.h.
#define M2MB_MBOX_PAYLOAD_MAX_SIZE (M2MB_SDIO_SLAVE_RECEIVE_BUFFER_SIZE-M2MB_MBOX_MSG_HDR_SIZE) |
MBOX payload maximum size
Definition at line 65 of file m2mb_sdio_slave.h.
#define M2MB_NUM_BUFFERS_PER_MBOX (16) |
SDIO number of buffers per MBOX
Definition at line 59 of file m2mb_sdio_slave.h.
#define M2MB_SDIO_SLAVE_FLOW_CTRL_HIGH_THRESHOLD 9 |
SDIO slave flow control high threshold,75 percent
Definition at line 77 of file m2mb_sdio_slave.h.
#define M2MB_SDIO_SLAVE_FLOW_CTRL_LOW_THRESHOLD 6 |
SDIO slave flow control low threshold,25 percent
Definition at line 76 of file m2mb_sdio_slave.h.
#define M2MB_SDIO_SLAVE_MBOX_ID (0) |
SDIO slave MBOX ID
Definition at line 79 of file m2mb_sdio_slave.h.
#define M2MB_SDIO_SLAVE_RECEIVE_BUFFER_COUNT (16) |
SDIO slave receive buffer count
Definition at line 56 of file m2mb_sdio_slave.h.
#define M2MB_SDIO_SLAVE_RECEIVE_BUFFER_SIZE (1536) |
SDIO slave receive buffer size
Definition at line 57 of file m2mb_sdio_slave.h.
#define M2MB_SDIO_SLAVE_WRITE_BUFFER_MAX (1) |
SDIO slave write buffer maximum size
Definition at line 70 of file m2mb_sdio_slave.h.
#define M2MB_SDIO_SLAVE_WRITE_BUFFER_SIZE (2048) |
SDIO slve write buffer size
Definition at line 61 of file m2mb_sdio_slave.h.
#define M2MB_SLAVE_INIT_DONE_EVT (0x00000002) |
slave init done event
Definition at line 54 of file m2mb_sdio_slave.h.
#define M2MB_SLAVE_WRITE_DONE_EVT (0x00000001) |
slave write done event
Definition at line 53 of file m2mb_sdio_slave.h.
typedef struct M2MB_SLAVE_MBOX_MSG_S M2MB_SLAVE_MBOX_MSG_T |
Structure used for SDIO slave MBOX message, Important note: This structure must be packed
typedef struct M2M_SLAVE_SDIO_BUFFER_S M2MB_SLAVE_SDIO_BUFFER_T |
Structure used for SDIO slave buffers
typedef struct M2MB_SLAVE_SDIO_S M2MB_SLAVE_SDIO_T |
Structure used for SDIO slave
typedef struct M2MB_SLAVE_SDIO_WRITE_REQUEST_S M2MB_SLAVE_SDIO_WRITE_REQUEST_T |
Structure used for SDIO slave write request
M2MB instance IDs
Enumerator | |
---|---|
M2MB_SDIO_SLAVE_INSTANCE_ID | |
M2MB_SPI_SLAVE_INSTANCE_ID | |
M2MB_MAX_INSTANCES |
Definition at line 136 of file m2mb_sdio_slave.h.
INT32 m2m_slave_sdio_is_initialized | ( | void | ) |
mobox initialisation
This function checks if sdio is initialized
void m2mb_slave_sdio_deinit | ( | int | instance_id, |
int | mbox | ||
) |
stops mbox h/w and deallocates dma resources
This function stops mbox h/w and deallocates dma resources
[in] | instance_id | instance ID |
[in] | mbox | mailbox number |
Example
sends rx pause indication to host
This function sends rx pause indication to host
[in] | instance_id | instance ID |
[in] | mbox | mailbox number |
Example
void m2mb_slave_sdio_post_init | ( | UINT32 | instance_id, |
INT32 | mbox, | ||
UINT32 | block_size, | ||
UINT32 | rxmsg_size, | ||
void * | pResetCb | ||
) |
additional initialisation needed for mbox
This function does additional initialisation needed for mbox
[in] | instance_id | instance ID |
[in] | mbox | mailbox number |
[in] | block_size | mbox block size |
[in] | rxmsg_size | receive message size |
[in] | pResetCb | Pointer to callback function |
Example
INT32 m2mb_slave_sdio_pre_init | ( | UINT32 | instance_id, |
INT32 | mbox, | ||
UINT32 | rx_buf_size, | ||
void * | pInitCb, | ||
void * | pSendCb, | ||
void * | pRecvCb, | ||
void * | pContext | ||
) |
mobox initialisation
This function does mobox initialisation
[in] | instance_id | instance ID |
[in] | mbox | mailbox number |
[in] | rx_buf_size | receive message size |
[in] | pInitCb | init callback function |
[in] | pSendCb | send callback function |
[in] | pRecvCb | receive callback function |
[in] | pContext | context |
Example
INT32 m2mb_slave_sdio_recv_buflist_dequeue | ( | INT32 | instance_id, |
INT32 | mbox, | ||
M2MB_SLAVE_SDIO_BUFFER_T ** | pbufinfo | ||
) |
deques a list of completed receive buffers.
This function deques a list of completed receive buffers
[in] | instance_id | instance ID |
[in] | mbox | mailbox number |
[in] | pbufinfo | buffer chain of completed buffers |
Example
INT32 m2mb_slave_sdio_recv_buflist_enqueue | ( | INT32 | instance_id, |
INT32 | mbox, | ||
M2MB_SLAVE_SDIO_BUFFER_T * | bufinfo | ||
) |
enques recieve buffer.
This function enques recieve buffer.
[in] | instance_id | instance ID |
[in] | mbox | mailbox number |
[in] | bufinfo | pointer to the buffer chain |
Example
sends rx resume indication to host
This function sends rx resume indication to host
[in] | instance_id | instance ID |
[in] | mbox | mailbox number |
Example
INT32 m2mb_slave_sdio_send_buflist_dequeue | ( | INT32 | instance_id, |
INT32 | mbox, | ||
M2MB_SLAVE_SDIO_BUFFER_T ** | pbufinfo | ||
) |
deques a list of completed send buffers.
This function deques a list of completed send buffers.
[in] | instance_id | instance ID |
[in] | mbox | mailbox number |
[in] | pbufinfo | buffer chain of completed buffers |
Example
INT32 m2mb_slave_sdio_send_buflist_enqueue | ( | INT32 | instance_id, |
INT32 | mbox, | ||
M2MB_SLAVE_SDIO_BUFFER_T * | bufinfo | ||
) |
enques tx buffer.
This function enques tx buffer.
[in] | instance_id | instance ID |
[in] | mbox | mailbox number |
[in] | bufinfo | pointer to the buffer chain |
Example
Increments the Host Tx credit counter registers.
This function Increments the Host Tx credit counter registers
[in] | instance_id | instance ID |
[in] | mbox | mailbox number |
Example