CSP Buffer
File: csp/csp_buffer.h
Description: Message buffer.
Interface Functions
-
csp_packet_t *csp_buffer_get(size_t unused)
[source] Get free buffer from task context.
- Parameters:
unused – OBSOLETE ignored field, csp packets have a fixed size now
- Returns:
Buffer pointer to #csp_packet_t or NULL if no buffers available
-
csp_packet_t *csp_buffer_get_isr(size_t unused)
[source] Get free buffer (from ISR context).
- Parameters:
unused – OBSOLETE ignored field, csp packets have a fixed size now
- Returns:
Buffer pointer to #csp_packet_t or NULL if no buffers available
-
void csp_buffer_free(void *buffer)
[source] Free buffer (from task context).
- Parameters:
buffer – buffer to free. NULL is handled gracefully.
-
void csp_buffer_free_isr(void *buffer)
[source] Free buffer (from ISR context).
- Parameters:
buffer – buffer to free. NULL is handled gracefully.
-
csp_packet_t *csp_buffer_clone(const csp_packet_t *packet)
[source] Clone an existing buffer. The existing buffer content is copied to the new buffer.
- Parameters:
buffer – buffer to clone.
- Returns:
cloned buffer on success, or NULL on failure.