CSP Interface
File: csp/csp_interface.h
Description: CSP Interface
Typedefs
-
typedef int (*nexthop_t)(csp_iface_t*, uint16_t, csp_packet_t*, int)
[source] Interface Tx function.
Structures
- struct csp_iface_s
[source]This struct is referenced in documentation. Update doc when you change this.
- void *driver_data
[source]Driver data, only known/used by the driver layer, e.g. device/channel references.
- void *interface_data
[source]Interface data, only known/used by the interface layer, e.g. state information.
- struct csp_iface_s *next
[source]
Interface Functions
-
void csp_qfifo_write(csp_packet_t *packet, csp_iface_t *iface, void *pxTaskWoken)
[source] Inputs a new packet into the system.
This function can be called from interface drivers (ISR) or tasks, to route and accept packets.
Note
EXTREMELY IMPORTANT: pxTaskWoken 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 the packet will always be either accepted or dropped, so the memory will always be freed.
- Parameters:
packet – A pointer to the incoming packet
iface – A pointer to the incoming interface TX function.
pxTaskWoken – Valid reference if called from ISR, otherwise NULL!