|
SDK3.5
This document shows Ameba SDK 3.5 APIs
|
spdio functions More...
Data Structures | |
| struct | spdio_buf_t |
| struct | spdio_t |
Variables | |
| void * | priv |
| u32 | buf_allocated |
| u16 | size_allocated |
| u32 | buf_addr |
| u16 | buf_size |
| u8 | type |
| u8 | reserved |
| void * | priv |
| u32 | tx_bd_num |
| u32 | rx_bd_num |
| u32 | rx_bd_bufsz |
| struct spdio_buf_t * | rx_buf |
| char(* | rx_done_cb )(void *priv, void *pbuf, u8 *pdata, u16 size, u8 type) |
| pointer to callback function defined by user, called by spdio when one packet receive done More... | |
| char(* | tx_done_cb )(void *priv, void *pbuf) |
| pointer to callback function defined by user, called by spdio when one packet sent done More... | |
Ameba Common | |
| enum | spdio_rx_data_t { SPDIO_RX_DATA_NULL = 0x00, SPDIO_RX_DATA_ETH = 0x83, SPDIO_RX_DATA_ATCMD = 0x11, SPDIO_RX_DATA_USER = 0x41 } |
| enum | spdio_tx_data_t { SPDIO_TX_DATA_NULL = 0x00, SPDIO_TX_DATA_ETH = 0x82, SPDIO_TX_DATA_ATCMDRSP = 0x10, SPDIO_TX_DATA_USER = 0x40 } |
| struct spdio_t * | g_spdio_priv |
| an obj which will be used to initialize sdio interface so it must be initialized before calling HalSdioInit(); | |
| void | spdio_structinit (struct spdio_t *obj) |
| Gets example setting for spdio obj. More... | |
| void | spdio_init (struct spdio_t *obj) |
| Initialize spdio interface. More... | |
| void | spdio_deinit (struct spdio_t *obj) |
| Deinitialize spdio interface. More... | |
| s8 | spdio_tx (struct spdio_t *obj, struct spdio_buf_t *pbuf) |
| spdio write function. More... | |
spdio functions
| void spdio_deinit | ( | struct spdio_t * | obj | ) |
Deinitialize spdio interface.
| obj | a pointer to spdio_t structure which is already initialized |
| None |
| void spdio_init | ( | struct spdio_t * | obj | ) |
Initialize spdio interface.
| obj,a | pointer to a spdio_t structure which should be initialized by user, and which will be used to initialize spdio interface obj->tx_bd_num: spdio write bd number, needs 2 bd for one transaction obj->rx_bd_num: spdio read bd number obj->rx_bd_bufsz: spdio read buffer size obj->rx_buf: spdio read buffer array |
| None |
| void spdio_structinit | ( | struct spdio_t * | obj | ) |
Gets example setting for spdio obj.
| obj | a pointer to an spdio_t structure which will be initialized with an example settings |
| None |
| s8 spdio_tx | ( | struct spdio_t * | obj, |
| struct spdio_buf_t * | pbuf | ||
| ) |
spdio write function.
| obj | a pointer to spdio_t structure which is already initialized |
| pbuf | a pointer to spdio_buf_t structure which carries the payload |
| SUCCESS | or FAIL |
| char(* rx_done_cb) (void *priv, void *pbuf, u8 *pdata, u16 size, u8 type) |
pointer to callback function defined by user, called by spdio when one packet receive done
| priv | a pointer to spdio_t structure which is used to initilize spdio interface |
| pbuf | a pointer to spdio_buf_t structure which is spdio receive buffer |
| pdata | the actual received packet payload |
| size | the actual payload length |
| type | the received packet type, spdio_rx_data_t |
| SUCCESS | or FAIL |
| char(* tx_done_cb) (void *priv, void *pbuf) |
pointer to callback function defined by user, called by spdio when one packet sent done
| priv | a pointer to spdio_t structure which is used to initilize spdio interface |
| pbuf | a pointer to spdio_buf_t structure which carries the transmit packet |
| SUCCESS | or FAIL |
1.8.11