poppy_com
0.1
Poppy2.0 communication library
|
Poppy communication main include file. More...
Go to the source code of this file.
Classes | |
struct | msg_t |
Message structure. More... | |
Typedefs | |
typedef void(* | RX_CB )(msg_dir_t dir, msg_t *msg) |
typedef void(* | TX_CB )(msg_t *msg) |
Enumerations | |
enum | msg_dir_t { TX, RX, RXGC, END } |
Message direction enum. More... | |
Functions | |
void | poppyNetwork_init (TX_CB tx_cb, RX_CB rx_cb, RX_CB rxgc_cb) |
Initialisation of the Poppy communication lib. More... | |
unsigned char | poppyNetwork_read (unsigned char addr, msg_t *msg, unsigned char reply_size) |
unsigned char | poppyNetwork_write (unsigned char addr, msg_t *msg) |
Master mode write function. More... | |
Poppy communication main include file.
Include this file to use the poppy communication protocole.
Definition in file poppyNetwork.h.
enum msg_dir_t |
Message direction enum.
Module specific register enumerator.
This structure is used to get the message direction but it seems to be useles because we have defferent interrupt for each msg_dir case.
This is the minimal include you will need to use poppy_com in a module application
This structure is used to list all the specific module register. The first register should be equal to PROTOCOL_REGISTER_NB, because is the first free register. The last register should be MODULE_REGISTER_NB, for the user space register enumerator...
Enumerator | |
---|---|
TX |
Slave transmiter mode. |
RX |
Slave receiver mode. |
RXGC |
Slave receiver général call mode. |
END |
Slave receiver stop. |
Definition at line 22 of file poppyNetwork.h.
void poppyNetwork_init | ( | TX_CB | tx_cb, |
RX_CB | rx_cb, | ||
RX_CB | rxgc_cb | ||
) |
Initialisation of the Poppy communication lib.
tx_cb | function pointer into the tx callback. |
rx_cb | function pointer into the rx callback. |
rxgc_cb | function pointer into the rx general call callback. |
Definition at line 17 of file poppyNetwork.c.
unsigned char poppyNetwork_write | ( | unsigned char | addr, |
msg_t * | msg | ||
) |
Master mode write function.
addr | Address of the slave. |
msg | Message to send to the slave. |
Definition at line 85 of file poppyNetwork.c.