|
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Include dependency graph for framed_ring_buffer.c:Go to the source code of this file.
Functions | |
| void | framed_ring_buffer_init (struct framed_ring_buffer *cb, uint8_t *buffer, size_t len) |
| initialize a circular buffer. | |
| int | framed_ring_buffer_get (struct framed_ring_buffer *cb, uint8_t *buf, size_t len) |
copy the next buffer available in cb to buf. | |
| int | framed_ring_buffer_put (struct framed_ring_buffer *cb, const uint8_t *buf, size_t len) |
Copy buf in the circular buffer. | |
| int | framed_ring_buffer_drop_last (struct framed_ring_buffer *cb) |
| Drop last inserted record. | |
| size_t | framed_ring_buffer_available (struct framed_ring_buffer *cb) |
| Get the available sapce for the next buffer. | |
| void | framed_ring_buffer_clear (struct framed_ring_buffer *cb) |
| Clear buffer. | |
| size_t framed_ring_buffer_available | ( | struct framed_ring_buffer * | cb | ) |
Get the available sapce for the next buffer.
Definition at line 110 of file framed_ring_buffer.c.
References framed_ring_buffer::_buf_len, foo, framed_ring_buffer::read_offset, and framed_ring_buffer::write_offset.
Referenced by framed_ring_buffer_put().
Here is the caller graph for this function:| void framed_ring_buffer_clear | ( | struct framed_ring_buffer * | cb | ) |
Clear buffer.
Definition at line 122 of file framed_ring_buffer.c.
References framed_ring_buffer::read_offset, and framed_ring_buffer::write_offset.
| int framed_ring_buffer_drop_last | ( | struct framed_ring_buffer * | cb | ) |
Drop last inserted record.
Definition at line 90 of file framed_ring_buffer.c.
References framed_ring_buffer::_buf, framed_ring_buffer::_buf_len, CIR_ERROR_NO_MSG, foo, framed_ring_buffer::read_offset, and framed_ring_buffer::write_offset.
Referenced by uavcan_broadcast().
Here is the caller graph for this function:| int framed_ring_buffer_get | ( | struct framed_ring_buffer * | cb, |
| uint8_t * | buf, | ||
| size_t | len | ||
| ) |
copy the next buffer available in cb to buf.
| cb | The circular buffer |
| buf | destination buffer |
| len | size of buf |
buf, or an error code if negative. Definition at line 22 of file framed_ring_buffer.c.
References framed_ring_buffer::_buf, framed_ring_buffer::_buf_len, CIR_ERROR_BUFFER_TOO_SMALL, CIR_ERROR_NO_MSG, foo, framed_ring_buffer::read_offset, and framed_ring_buffer::write_offset.
Referenced by sts3032_event(), and uavcan_tx().
Here is the caller graph for this function:| void framed_ring_buffer_init | ( | struct framed_ring_buffer * | cb, |
| uint8_t * | buffer, | ||
| size_t | len | ||
| ) |
initialize a circular buffer.
| cb | framed_ring_buffer structure |
| buffer | buffer used internally by the framed ring buffer |
| len | size of buffer |
Definition at line 13 of file framed_ring_buffer.c.
References framed_ring_buffer::_buf, framed_ring_buffer::_buf_len, framed_ring_buffer::read_offset, and framed_ring_buffer::write_offset.
Referenced by actuators_sts3032_init(), and uavcanInitIface().
Here is the caller graph for this function:| int framed_ring_buffer_put | ( | struct framed_ring_buffer * | cb, |
| const uint8_t * | buf, | ||
| size_t | len | ||
| ) |
Copy buf in the circular buffer.
| cb | The circular buffer |
| buf | source buffer |
| len | Size of buf |
Definition at line 52 of file framed_ring_buffer.c.
References framed_ring_buffer::_buf, framed_ring_buffer::_buf_len, CIR_ERROR_NO_SPACE_AVAILABLE, foo, framed_ring_buffer_available(), and framed_ring_buffer::write_offset.
Referenced by uavcan_broadcast(), and write_buf().
Here is the call graph for this function:
Here is the caller graph for this function: