![]() |
![]() |
Mailbox driver interface. More...
#include <stdint.h>#include <stddef.h>#include <ti/common/mmwave_error.h>#include <ti/drivers/osal/SemaphoreP.h>Data Structures | |
| struct | Mailbox_Config_t |
| Mailbox Configuration Parameters. More... | |
| struct | Mailbox_Stats_t |
| Mailbox Statistics. More... | |
Macros | |
| #define | MAILBOX_EINVAL (MMWAVE_ERRNO_MAILBOX_BASE-1) |
| Error Code: Invalid argument. | |
| #define | MAILBOX_EINUSE (MMWAVE_ERRNO_MAILBOX_BASE-2) |
| Error Code: Operation cannot be implemented because a previous operation is still not complete. | |
| #define | MAILBOX_ENOMEM (MMWAVE_ERRNO_MAILBOX_BASE-3) |
| Error Code: Out of memory. | |
| #define | MAILBOX_EINVALCFG (MMWAVE_ERRNO_MAILBOX_BASE-4) |
| Error Code: Invalid configuration. | |
| #define | MAILBOX_ETXFULL (MMWAVE_ERRNO_MAILBOX_BASE-5) |
| Error Code: TX mailbox full. Application tried to send a message before ACK of the previously TX message was received. More... | |
| #define | MAILBOX_ETXACKTIMEDOUT (MMWAVE_ERRNO_MAILBOX_BASE-6) |
| Error Code: Write Acknowledge timed out. Driver was pending on semaphore waiting for an acknowledge and the semaphore timed out. | |
| #define | MAILBOX_EREADTIMEDOUT (MMWAVE_ERRNO_MAILBOX_BASE-7) |
| Error Code: Blocking read timed out. | |
| #define | MAILBOX_EINITIALIZED (MMWAVE_ERRNO_MAILBOX_BASE-8) |
| Error Code: Mailbox driver already initialized. | |
| #define | MAILBOX_EOSAL (MMWAVE_ERRNO_MAILBOX_BASE-9) |
| Error Code: Osal call failed. | |
| #define | MAILBOX_EBADCHTYPE (MMWAVE_ERRNO_MAILBOX_BASE-10) |
| Error Code: Invalid channel type. Indicates that the channel type is invalid, OR Indicates that a mailbox instance is tried to be opened with a channel type different than other instances (for the same endpoint). | |
| #define | MAILBOX_EBADCHID (MMWAVE_ERRNO_MAILBOX_BASE-11) |
| Error Code: Invalid channel type. Indicates that the channel ID is invalid, OR Indicates that a channel ID is already in use. | |
| #define | MAILBOX_ECHINUSE (MMWAVE_ERRNO_MAILBOX_BASE-12) |
| Error Code: Mailbox channel in use by another instance. | |
| #define | MAILBOX_NUM_ENDPOINT_TYPES (uint8_t)3 |
| Number of possible endpoint types. | |
| #define | MAILBOX_DATA_BUFFER_SIZE (uint32_t)2044U |
| Mailbox buffer size (in bytes) for data transfer (per direction). | |
| #define | MAILBOX_WAIT_FOREVER SemaphoreP_WAIT_FOREVER |
| Wait forever define. | |
Typedefs | |
| typedef void * | Mbox_Handle |
| A handle that is returned from a Mailbox_open() call. | |
| typedef void(* | Mailbox_Callback) (Mbox_Handle handle, Mailbox_Type remoteEndpoint) |
| The definition of a callback function used by the MAILBOX driver when used in MAILBOX_MODE_CALLBACK. The callback can occur in task or HWI context. More... | |
| typedef struct Mailbox_Config_t | Mailbox_Config |
| Mailbox Configuration Parameters. More... | |
| typedef struct Mailbox_Stats_t | Mailbox_Stats |
| Mailbox Statistics. More... | |
Enumerations |
Functions | |
| int32_t | Mailbox_close (Mbox_Handle handle) |
| Function to close a Mailbox peripheral specified by the Mailbox handle. More... | |
| int32_t | Mailbox_init (Mailbox_Type localEndpoint) |
| Function to initialize the Mailbox module. It must be called only once per local endpoint. More... | |
| Mbox_Handle | Mailbox_open (Mailbox_Type remoteEndpoint, const Mailbox_Config *cfg, int32_t *errCode) |
| Function to initialize an instance of the mailbox driver. More... | |
| int32_t | Mailbox_Config_init (Mailbox_Config *cfg) |
| Function to initialize the Mailbox_Config struct to its defaults. More... | |
| int32_t | Mailbox_write (Mbox_Handle handle, const uint8_t *buffer, uint32_t size) |
| Function that writes data to a Mailbox. More... | |
| int32_t | Mailbox_read (Mbox_Handle handle, uint8_t *buffer, uint32_t size) |
| Function that reads data from a Mailbox. More... | |
| int32_t | Mailbox_readFlush (Mbox_Handle handle) |
| Function that should be called after application is done reading the message. More... | |
| int32_t | Mailbox_writeReset (Mbox_Handle handle) |
| Function that should be called if application is unable to write to mailbox. More... | |
| int32_t | Mailbox_getStats (Mbox_Handle handle, Mailbox_Stats *stats) |
| Function that collects mailbox driver statistics. More... | |
Mailbox driver interface.
============================================================================