Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
direct_memory_logger.c File Reference

Write logs directly to flash memory chips. More...

#include "direct_memory_logger.h"
#include "mcu_periph/uart.h"
#include "modules/imu/imu.h"
#include "stabilization.h"
+ Include dependency graph for direct_memory_logger.c:

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
 

Detailed Description

Write logs directly to flash memory chips.

Definition in file direct_memory_logger.c.


Data Structure Documentation

◆ LogStruct

struct LogStruct

Definition at line 43 of file direct_memory_logger.c.

Data Fields
int32_t accel_z
uint32_t counter
int32_t gyro_p
int32_t gyro_q
int32_t gyro_r
int32_t thrust

Function Documentation

◆ direct_memory_logger_init()

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.

+ Here is the call graph for this function:

◆ direct_memory_logger_periodic()

◆ direct_memory_logger_set()

◆ direct_memory_spi_cb()

static void direct_memory_spi_cb ( struct spi_transaction trans)
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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ seq_in_array()

static int32_t seq_in_array ( uint8_t array,
uint16_t  array_size,
uint8_t sequence,
uint16_t  sequence_size 
)
static

Definition at line 54 of file direct_memory_logger.c.

References array.

Referenced by direct_memory_logger_periodic().

+ Here is the caller graph for this function:

Variable Documentation

◆ dm_counter

uint32_t dm_counter = 0
static

Definition at line 52 of file direct_memory_logger.c.

Referenced by direct_memory_logger_periodic().

◆ dml

◆ log_struct

struct LogStruct log_struct
static

Definition at line 39 of file direct_memory_logger.c.

Referenced by direct_memory_logger_periodic().

◆ start_log_sequence

uint8_t start_log_sequence[6] = {0xAA, 0x55, 0xFF, 0x00, 0x55, 0xAA}
static

Definition at line 38 of file direct_memory_logger.c.

Referenced by direct_memory_logger_set().

◆ stop_log_sequence

uint8_t stop_log_sequence[6] = {0xFF, 0x00, 0x55, 0xAA, 0x10, 0xFF}
static

Definition at line 39 of file direct_memory_logger.c.

Referenced by direct_memory_logger_periodic().