Macros | |
#define | csp_new_packet csp_qfifo_write |
csp_new_packet is deprecated, use csp_qfifo_write More... | |
Functions | |
void | csp_qfifo_write (csp_packet_t *packet, csp_iface_t *interface, CSP_BASE_TYPE *pxTaskWoken) |
Inputs a new packet into the system This function is called from interface drivers ISR to route and accept packets. More... | |
uint8_t | csp_route_get_mac (uint8_t node) |
Get MAC layer address of next hop. More... | |
void | csp_iflist_add (csp_iface_t *ifc) |
Register your interface in the router core using this function. More... | |
Macro Definition Documentation
#define csp_new_packet csp_qfifo_write |
csp_new_packet is deprecated, use csp_qfifo_write
Function Documentation
void csp_iflist_add | ( | csp_iface_t * | ifc | ) |
Register your interface in the router core using this function.
This must be done in the interface init() function.
void csp_qfifo_write | ( | csp_packet_t * | packet, |
csp_iface_t * | interface, | ||
CSP_BASE_TYPE * | pxTaskWoken | ||
) |
Inputs a new packet into the system This function is called from interface drivers ISR to route and accept packets.
But it can also be called from a task, provided that the pxTaskWoken parameter is NULL!
EXTREMELY IMPORTANT: pxTaskWoken arg must ALWAYS be NULL if called from task, and ALWAYS be NON NULL if called from ISR! If this condition is met, this call is completely thread-safe
This function is fire and forget, it returns void, meaning that a packet will always be either accepted or dropped so the memory will always be freed.
- Parameters
-
packet A pointer to the incoming packet interface A pointer to the incoming interface TX function. pxTaskWoken This must be a pointer a valid variable if called from ISR or NULL otherwise!
uint8_t csp_route_get_mac | ( | uint8_t | node | ) |
Get MAC layer address of next hop.
- Parameters
-
node Next hop node
- Returns
- MAC layer address