Paparazzi UAS
v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
|
Write logs directly to flash memory chips. More...
#include "direct_memory_logger.h"
#include "mcu_periph/uart.h"
#include "subsystems/imu.h"
#include "stabilization.h"
Go to the source code of this file.
Data Structures | |
struct | LogStruct |
Functions | |
static void | direct_memory_spi_cb (struct spi_transaction *trans) |
static int32_t | seq_in_array (uint8_t *array, uint16_t array_size, uint8_t *sequence, uint16_t sequence_size) |
void | direct_memory_logger_init (void) |
void | direct_memory_logger_periodic (void) |
void | direct_memory_logger_set (uint8_t val) |
Variables | |
struct DirectMemoryLogger | dml |
static uint8_t | start_log_sequence [6] = {0xAA, 0x55, 0xFF, 0x00, 0x55, 0xAA} |
static uint8_t | stop_log_sequence [6] = {0xFF, 0x00, 0x55, 0xAA, 0x10, 0xFF} |
static struct LogStruct | log_struct |
static uint32_t | dm_counter = 0 |
Write logs directly to flash memory chips.
Definition in file direct_memory_logger.c.
struct LogStruct |
void direct_memory_logger_init | ( | void | ) |
Definition at line 91 of file direct_memory_logger.c.
References direct_memory_spi_cb(), dml, DML_INIT, DirectMemoryLogger::sst, sst25vfxxxx_init(), and DirectMemoryLogger::status.
void direct_memory_logger_periodic | ( | void | ) |
Definition at line 99 of file direct_memory_logger.c.
References Imu::accel, LogStruct::accel_z, DirectMemoryLogger::buffer, LogStruct::counter, dml, DML_BUF_SIZE, DML_IDLE, DML_LOGGING, DML_READ, DML_READING, DML_START, DML_STOP, SST25VFxxxx::flash_addr, Imu::gyro, LogStruct::gyro_p, LogStruct::gyro_q, LogStruct::gyro_r, imu, log_struct, Int32Rates::p, Int32Rates::q, Int32Rates::r, seq_in_array(), DirectMemoryLogger::sst, SST25VFXXXX_IDLE, sst25vfxxxx_read(), sst25vfxxxx_write(), stabilization_cmd, DirectMemoryLogger::status, SST25VFxxxx::status, stop_log_sequence, LogStruct::thrust, uart_put_byte(), DirectMemoryLogger::write_addr, and Int32Vect3::z.
void direct_memory_logger_set | ( | uint8_t | val | ) |
Definition at line 180 of file direct_memory_logger.c.
References DirectMemoryLogger::buffer, dml, DML_BUF_SIZE, DML_ERASE, DML_IDLE, DML_LOGGING, DML_READ, DML_START, DML_STOP, SST25VFxxxx::flash_addr, DirectMemoryLogger::sst, sst25vfxxxx_chip_erase(), sst25vfxxxx_read(), sst25vfxxxx_write(), start_log_sequence, DirectMemoryLogger::status, val, and DirectMemoryLogger::write_addr.
|
static |
Definition at line 214 of file direct_memory_logger.c.
References dml, DirectMemoryLogger::sst, and sst25vfxxxx_after_cb().
Referenced by direct_memory_logger_init().
|
static |
Definition at line 54 of file direct_memory_logger.c.
Referenced by direct_memory_logger_periodic().
|
static |
Definition at line 52 of file direct_memory_logger.c.
struct DirectMemoryLogger dml |
Definition at line 33 of file direct_memory_logger.c.
Referenced by direct_memory_logger_init(), direct_memory_logger_periodic(), direct_memory_logger_set(), and direct_memory_spi_cb().
|
static |
Definition at line 51 of file direct_memory_logger.c.
Referenced by direct_memory_logger_periodic().
|
static |
Definition at line 38 of file direct_memory_logger.c.
Referenced by direct_memory_logger_set().
|
static |
Definition at line 39 of file direct_memory_logger.c.
Referenced by direct_memory_logger_periodic().