Classes | |
| struct | hostif_buff_s |
| Common buffer configuration. More... | |
| struct | hostif_i2cconf_s |
| I2C buffer configuration. More... | |
| struct | hostif_spiconf_s |
| SPI buffer configuration. More... | |
Macros | |
| #define | MAX_BUFFER_NUM 32 |
| Host interface maximum number of buffers. | |
| #define | HOSTIF_BUFF_ATTR_ADDR_OFFSET(n) (((n) & 0x3) << 4) |
| Host interface buffer attributes. More... | |
| #define | HOSTIF_BUFF_ATTR_FIXLEN (0 << 2) |
| #define | HOSTIF_BUFF_ATTR_VARLEN (1 << 2) |
| #define | HOSTIF_BUFF_ATTR_WRITE (0 << 1) |
| #define | HOSTIF_BUFF_ATTR_READ (1 << 1) |
| #define | EXTERN extern "C" |
Functions | |
| int | hostif_i2cinitialize (struct hostif_i2cconf_s *config) |
| int | hostif_spiinitialize (struct hostif_spiconf_s *config) |
| int | hostif_uninitialize (void) |
| #define HOSTIF_BUFF_ATTR_ADDR_OFFSET | ( | n | ) | (((n) & 0x3) << 4) |
Host interface buffer attributes.
2 to the power of n
| #define HOSTIF_BUFF_ATTR_FIXLEN (0 << 2) |
fixed length
| #define HOSTIF_BUFF_ATTR_VARLEN (1 << 2) |
variable length
| #define HOSTIF_BUFF_ATTR_WRITE (0 << 1) |
from target to host
| #define HOSTIF_BUFF_ATTR_READ (1 << 1) |
from host to target
| int hostif_i2cinitialize | ( | struct hostif_i2cconf_s * | config | ) |
Initialize the host interface for I2C slave
| [in] | config | - pointer to I2C buffer configuration |
| int hostif_spiinitialize | ( | struct hostif_spiconf_s * | config | ) |
Initialize the host interface for SPI slave
| [in] | config | - pointer to SPI buffer configuration |
| int hostif_uninitialize | ( | void | ) |
Uninitialize the host interface