|  | Paparazzi UAS v7.0_unstable
    Paparazzi is a free software Unmanned Aircraft System. | 
#include <ch.h>#include <hal.h>#include "modules/loggers/sdlog_chibios/sdLog.h"#include "modules/loggers/sdlog_chibios/usbStorage.h"#include "modules/loggers/sdlog_chibios/printf.h"#include "modules/loggers/sdlog_chibios.h"#include "modules/tlsf/tlsf_malloc.h"#include "mcu_periph/adc.h"#include "mcu.h"#include "led.h"#include "modules/datalink/telemetry.h" Include dependency graph for sdlog_chibios.c:
 Include dependency graph for sdlog_chibios.c:Go to the source code of this file.
| Macros | |
| #define | SDLOG_START_DELAY 30 | 
| #define | SDLOG_AUTO_FLUSH_PERIOD 10 | 
| #define | SDLOG_CONTIGUOUS_STORAGE_MEM 50 | 
| #define | SDLOG_ENABLE_LOWBAT_FLUSH TRUE | 
| Enumerations | |
| enum | { SDLOG_STOPPED = 0 , SDLOG_RUNNING , SDLOG_ERROR } | 
| sdlog status  More... | |
| Functions | |
| static | IN_DMA_SECTION (THD_WORKING_AREA(wa_thd_startlog, 4096)) | 
| static void | thd_startlog (void *arg) | 
| static void | send_sdlog_status (struct transport_tx *trans, struct link_device *dev) | 
| static int | sdlog_check_free_space (struct chibios_sdlog *p, long *fd, uint16_t len) | 
| static void | sdlog_transmit (struct chibios_sdlog *p, long fd, uint8_t byte) | 
| static void | sdlog_transmit_buffer (struct chibios_sdlog *p, long fd, uint8_t *data, uint16_t len) | 
| static void | sdlog_send (struct chibios_sdlog *p, long fd) | 
| static int | null_function (struct chibios_sdlog *p) | 
| static uint8_t | null_byte_function (struct chibios_sdlog *p) | 
| void | chibios_sdlog_init (struct chibios_sdlog *sdlog, FileDes *file) | 
| init chibios_sdlog structure | |
| void | sdlog_chibios_init (void) | 
| void | sdlog_chibios_finish (const bool flush) | 
| void | logger_log_msg_up (uint8_t *buf) | 
| Variables | |
| static const char | PPRZ_LOG_NAME [] = "pprzlog_" | 
| static const char | PPRZ_LOG_DIR [] = "PPRZ" | 
| bool | sdOk = false | 
| FileDes | pprzLogFile = -1 | 
| struct chibios_sdlog | chibios_sdlog | 
| static enum { ... } | chibios_sdlog_status | 
| sdlog status | |
| static char | chibios_sdlog_filenames [68] | 
| sdlog filenames | |
| static char | NO_FILE_NAME [] = "none" | 
| #define SDLOG_AUTO_FLUSH_PERIOD 10 | 
Definition at line 52 of file sdlog_chibios.c.
| #define SDLOG_CONTIGUOUS_STORAGE_MEM 50 | 
Definition at line 57 of file sdlog_chibios.c.
Definition at line 62 of file sdlog_chibios.c.
| #define SDLOG_START_DELAY 30 | 
Definition at line 47 of file sdlog_chibios.c.
sdlog status
| Enumerator | |
|---|---|
| SDLOG_STOPPED | |
| SDLOG_RUNNING | |
| SDLOG_ERROR | |
Definition at line 93 of file sdlog_chibios.c.
| void chibios_sdlog_init | ( | struct chibios_sdlog * | sdlog, | 
| FileDes * | file | ||
| ) | 
init chibios_sdlog structure
Definition at line 178 of file sdlog_chibios.c.
References foo, null_byte_function(), null_function(), sdlog_check_free_space(), sdlog_send(), sdlog_transmit(), and sdlog_transmit_buffer().
Referenced by flight_recorder_init(), and thd_startlog().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Definition at line 382 of file sdlog_chibios.c.
References DEST_INFO_MSG_ALL, DEST_INFO_MSG_PPRZLOG, fd, foo, msg, and pprzLogFile.
| 
 | static | 
Definition at line 176 of file sdlog_chibios.c.
Referenced by chibios_sdlog_init().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Definition at line 175 of file sdlog_chibios.c.
Referenced by chibios_sdlog_init().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Definition at line 142 of file sdlog_chibios.c.
References fd, foo, SDLOG_OK, and status.
Referenced by chibios_sdlog_init().
 Here is the caller graph for this function:
 Here is the caller graph for this function:Definition at line 213 of file sdlog_chibios.c.
References chibios_sdlog_status, foo, pprzLogFile, SDLOG_STOPPED, and sdLogFinish().
Referenced by thdUsbStorage().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:Definition at line 193 of file sdlog_chibios.c.
References chibios_sdlog_status, DefaultPeriodic, foo, preflight_check_register(), register_periodic_telemetry(), SDLOG_STOPPED, send_sdlog_status(), thd_startlog(), and usbStorageStartPolling().
 Here is the call graph for this function:
 Here is the call graph for this function:| 
 | static | 
Definition at line 169 of file sdlog_chibios.c.
Referenced by chibios_sdlog_init().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Definition at line 154 of file sdlog_chibios.c.
Referenced by chibios_sdlog_init().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Definition at line 162 of file sdlog_chibios.c.
Referenced by chibios_sdlog_init().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Definition at line 124 of file sdlog_chibios.c.
References chibios_sdlog_filenames, chibios_sdlog_status, dev, foo, NO_FILE_NAME, and status.
Referenced by sdlog_chibios_init().
 Here is the caller graph for this function:
 Here is the caller graph for this function:Definition at line 291 of file sdlog_chibios.c.
References chibios_sdlog_filenames, chibios_sdlog_init(), chibios_sdlog_status, chsnprintf(), foo, gps, LED_TOGGLE, LOG_APPEND_TAG_AT_CLOSE_DISABLED, LOG_PREALLOCATION_DISABLED, PPRZ_LOG_DIR, PPRZ_LOG_NAME, pprzLogFile, removeEmptyLogs(), SDLOG_AUTO_FLUSH_PERIOD, SDLOG_CONTIGUOUS_STORAGE_MEM, SDLOG_ERROR, SDLOG_OK, SDLOG_RUNNING, SDLOG_START_DELAY, sdLogInit(), sdOk, GpsState::tow, usbStorageIsItRunning(), and GpsState::week.
Referenced by sdlog_chibios_init().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| struct chibios_sdlog chibios_sdlog | 
Definition at line 83 of file sdlog_chibios.c.
| 
 | static | 
sdlog filenames
Definition at line 101 of file sdlog_chibios.c.
Referenced by send_sdlog_status(), and thd_startlog().
| enum { ... } chibios_sdlog_status | 
sdlog status
Referenced by sdlog_chibios_finish(), sdlog_chibios_init(), send_sdlog_status(), and thd_startlog().
| 
 | static | 
Definition at line 102 of file sdlog_chibios.c.
Referenced by send_sdlog_status().
Definition at line 71 of file sdlog_chibios.c.
Referenced by thd_startlog().
Definition at line 70 of file sdlog_chibios.c.
Referenced by thd_startlog().
| FileDes pprzLogFile = -1 | 
Definition at line 81 of file sdlog_chibios.c.
Referenced by airspeed_cb(), airspeed_ets_read_event(), aoa_pwm_update(), apogee_baro_event(), baro_cb(), dw1000_arduino_periodic(), gps_cb(), gps_ubx_parse(), gyro_cb(), humid_sht_periodic(), incidence_cb(), ins_float_invariant_propagate(), ins_mekf_wind_wrapper_init(), logger_control_effectiveness_periodic(), logger_control_effectiveness_start(), logger_log_msg_up(), mag_cb(), mf_daq_send_report(), mf_ptu_periodic(), pressure_diff_cb(), process_data(), sdlog_chibios_finish(), temod_event(), thd_startlog(), wind_estimator_init(), and wind_estimator_step().
Definition at line 79 of file sdlog_chibios.c.
Referenced by thd_startlog().