LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ipc_msg.h File Reference

Go to the source code of this file.

Data Structures

struct  ipc_queue
 IPC Queue Structure used for sync between M0 and M4. More...
 

Macros

#define QUEUE_DATA_COUNT(q)   ((uint32_t) ((q)->head - (q)->tail))
 
#define QUEUE_IS_FULL(q)   (QUEUE_DATA_COUNT(q) >= (q)->size)
 
#define QUEUE_IS_EMPTY(q)   ((q)->head == (q)->tail)
 
#define QUEUE_VALID   1
 
#define QUEUE_INSERT   0
 
#define QUEUE_FULL   -1
 
#define QUEUE_EMPTY   -2
 
#define QUEUE_ERROR   -3
 
#define QUEUE_TIMEOUT   -4
 

Functions

int IPC_pushMsgTout (const void *data, int tout)
 Function to push a message into queue with timeout.
 
int IPC_popMsgTout (void *data, int tout)
 Function to read a message from queue with timeout.
 
static INLINE int IPC_tryPushMsg (const void *data)
 Function to push the message into queue with no wait.
 
static INLINE int IPC_tryPopMsg (void *data)
 Function to pop the message from queue with no wait.
 
static INLINE int IPC_pushMsg (const void *data)
 Function to push the message into queue with wait.
 
static INLINE int IPC_popMsg (void *data)
 Function to pop the message from queue with wait.
 
int IPC_msgPending (int queue_write)
 Get number of pending items in queue.
 
void IPC_msgNotify (void)
 Function to send notificaton interrupt.
 
void IPC_initMsgQueue (void *data, int msgSize, int maxNoOfMsg)
 Function to initialize the IPC message queue.
 
const char * IPC_strerror (int errnum)
 Function to convert IPC error number to string.