|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
50 } __attribute__((packed));
57 static uint16_t current_sequence_id = 0;
60 for (i = 0; i < array_size; i++) {
63 if (
array[i] == sequence[current_sequence_id]) {
64 current_sequence_id++;
65 if (current_sequence_id >= sequence_size) {
67 current_sequence_id = 0;
71 current_sequence_id = 0;
75 if (
array[i] == 0xFF) {
78 if (count_ff >= 1000) {
80 current_sequence_id = 0;
157 end_idx = seq_idx + 5;
161 for (i = 5; i < end_idx; i++) {
static void direct_memory_spi_cb(struct spi_transaction *trans)
void sst25vfxxxx_write(struct SST25VFxxxx *sst, uint8_t *transfer_buffer, uint8_t transfer_length)
Write bytes.
struct Int32Vect3 accel
accelerometer measurements in m/s^2 in BFP with INT32_ACCEL_FRAC
int32_t q
in rad/s with INT32_RATE_FRAC
SPI transaction structure.
static uint8_t start_log_sequence[6]
void direct_memory_logger_init(void)
@ DML_START
The DML is starting the logger.
struct SST25VFxxxx sst
The memory chip.
#define DML_BUF_SIZE
The read buffer size.
static struct LogStruct log_struct
void direct_memory_logger_set(uint8_t val)
int32_t p
in rad/s with INT32_RATE_FRAC
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
static uint8_t stop_log_sequence[6]
void direct_memory_logger_periodic(void)
@ DML_READING
The DML is busy reading.
struct DirectMemoryLogger dml
static int32_t seq_in_array(uint8_t *array, uint16_t array_size, uint8_t *sequence, uint16_t sequence_size)
void sst25vfxxxx_read(struct SST25VFxxxx *sst, uint8_t *transfer_buffer, uint8_t transfer_length)
Read bytes Need 5 more extra bytes because of SPI overhead.
enum DMLStatus status
The status of the Direct Memory Logger.
void uart_put_byte(struct uart_periph *p, long fd, uint8_t data)
Uart transmit implementation.
Write logs directly to flash memory chips.
enum SST25VFxxxxStatus status
The status of the SST25VFxxxx flash chip.
uint32_t flash_addr
The flash address to write at.
@ DML_ERASE
The DML is busy erasing itself.
struct Imu imu
global IMU state
@ SST25VFXXXX_IDLE
The chip is idle and can be used.
@ DML_INIT
The DML is initializing.
@ DML_STOP
The DML is busy stopping.
void sst25vfxxxx_chip_erase(struct SST25VFxxxx *sst)
Full chip erase.
@ DML_READ
The DML is busy starting read.
uint8_t buffer[DML_BUF_SIZE]
The buffer for writing and reading.
void sst25vfxxxx_after_cb(struct SST25VFxxxx *sst)
Callback of the SPI after going one level higher for gathering the sst pointer.
int32_t stabilization_cmd[COMMANDS_NB]
Stabilization commands.
static uint32_t dm_counter
@ DML_LOGGING
The DML is busy logging.
int32_t r
in rad/s with INT32_RATE_FRAC
@ DML_IDLE
The DML is idle.
struct Int32Rates gyro
gyroscope measurements in rad/s in BFP with INT32_RATE_FRAC
void sst25vfxxxx_init(struct SST25VFxxxx *sst, struct spi_periph *spi_p, const uint8_t slave_idx, SPICallback spi_cb)
Initializing the sst25vfxxxx chip.