Nut/OS  4.10.3
API Reference
msg.h File Reference
#include <sys/timer.h>
#include <stdint.h>
Include dependency graph for msg.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _NUTMSG
struct  _NUTMSGQ

Defines

#define MSG_TIMER   0xfe
#define MSG_NULL   0xff

Typedefs

typedef struct _NUTMSG NUTMSG
typedef struct _NUTMSGTMR NUTMSGTMR
typedef struct _NUTMSGQ NUTMSGQ

Functions

NUTMSGQNutMsgQCreate (uint8_t len)
 Allocate a new message que.
int NutMsgQBroadcast (uint8_t id, int param, void *data)
 Send a message to all message ques.
int NutMsgQPost (NUTMSGQ *que, uint8_t id, int param, void *data)
 Send a message to a que and return immediately.
int NutMsgQSend (NUTMSGQ *que, uint8_t id, int param, void *data)
 Send a message to a que and yields so that a waiting thread can act on the message.
int NutMsgQGetMessage (NUTMSGQ *que, NUTMSG *msg, uint32_t timeout)
 Gets the next message from the que.
int NutMsgQFull (NUTMSGQ *que)
 Checks the state of a que.
void NutMsgQFlush (NUTMSGQ *que)
 Removes all entries from a que.
HANDLE NutMsgQStartTimer (NUTMSGQ *que, uint32_t ms, int param, void *data, uint8_t flags)
 Starts a periodic or one-shot timer on the given que.
void NutMsgQStopTimer (HANDLE timer)
 Stops a timer.

Define Documentation

#define MSG_TIMER   0xfe

Definition at line 92 of file msg.h.

Referenced by NutMsgQGetMessage(), and NutMsgQStopTimer().

#define MSG_NULL   0xff

Definition at line 93 of file msg.h.

Referenced by NutMsgQStopTimer().


Typedef Documentation

typedef struct _NUTMSG NUTMSG

Definition at line 60 of file msg.h.

typedef struct _NUTMSGTMR NUTMSGTMR

Definition at line 67 of file msg.h.

typedef struct _NUTMSGQ NUTMSGQ

Definition at line 70 of file msg.h.