![]() |
ACwing FC firmware
STM32WB55: attitude IEKF, altitude Kalman filter, flight core, protocol v2
|
Record queues (see log_queue.h). More...
Go to the source code of this file.
Data Structures | |
| struct | ring_t |
Functions | |
| uint8_t | log_q_active (void) |
| void | log_q_set_active (uint8_t on) |
| void | log_q_reset (void) |
| int | log_q_put (uint8_t src, uint8_t type, const void *p, uint8_t len) |
| 0 = queued | |
| uint32_t | log_q_get (uint8_t src, uint8_t *type, void *p, uint8_t cap) |
| next record of 'src': returns payload length + 1, 0 if empty | |
| uint16_t | log_q_take_drops (uint8_t src) |
Variables | |
| static uint8_t | s_b_imu [LOG_Q_IMU_SIZE] |
| static uint8_t | s_b_batt [LOG_Q_BATT_SIZE] |
| static ring_t | s_r [LOG_SRC_COUNT] |
| static volatile uint8_t | s_active |
Record queues (see log_queue.h).
Definition in file log_queue.c.
| uint8_t log_q_active | ( | void | ) |
Definition at line 24 of file log_queue.c.
References s_active.
Referenced by log_records(), logf_att(), logf_est(), logf_event(), logf_flight(), logf_power(), and logf_vert().
| void log_q_set_active | ( | uint8_t | on | ) |
Definition at line 25 of file log_queue.c.
Referenced by recording().
| void log_q_reset | ( | void | ) |
Definition at line 27 of file log_queue.c.
References ring_t::drops, ring_t::drops_seen, ring_t::head, LOG_SRC_COUNT, s_active, s_r, and ring_t::tail.
Referenced by log_task_init().
| int log_q_put | ( | uint8_t | src, |
| uint8_t | type, | ||
| const void * | p, | ||
| uint8_t | len | ||
| ) |
0 = queued
Definition at line 33 of file log_queue.c.
References b, ring_t::buf, ring_t::drops, ring_t::head, LOG_SRC_COUNT, n, s_r, ring_t::size, SPSC_BARRIER, ring_t::tail, and used.
Referenced by logf_att(), logf_est(), logf_event(), logf_flight(), logf_power(), and logf_vert().
| uint32_t log_q_get | ( | uint8_t | src, |
| uint8_t * | type, | ||
| void * | p, | ||
| uint8_t | cap | ||
| ) |
next record of 'src': returns payload length + 1, 0 if empty
Definition at line 52 of file log_queue.c.
References b, ring_t::buf, cap, ring_t::head, LOG_SRC_COUNT, s_r, ring_t::size, SPSC_BARRIER, and ring_t::tail.
Referenced by drain(), and log_task_step().
| uint16_t log_q_take_drops | ( | uint8_t | src | ) |
Definition at line 73 of file log_queue.c.
References ring_t::drops, ring_t::drops_seen, LOG_SRC_COUNT, n, and s_r.
Referenced by drain(), and log_task_step().
|
static |
Definition at line 17 of file log_queue.c.
|
static |
Definition at line 17 of file log_queue.c.
|
static |
Definition at line 18 of file log_queue.c.
Referenced by log_q_get(), log_q_put(), log_q_reset(), and log_q_take_drops().
|
static |
Definition at line 22 of file log_queue.c.
Referenced by log_q_active(), log_q_reset(), and log_q_set_active().