Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
imu_crista_arch.c File Reference
#include "subsystems/imu.h"
#include <stm32/gpio.h>
#include <stm32/rcc.h>
#include <stm32/spi.h>
#include <stm32/misc.h>
#include <stm32/dma.h>
+ Include dependency graph for imu_crista_arch.c:

Go to the source code of this file.

Macros

#define POWER_MODE   (1 << 1 | 1)
 
#define SGL_DIF   1
 
#define ADS8344Unselect()   GPIOB->BSRR = GPIO_Pin_12
 
#define ADS8344Select()   GPIOB->BRR = GPIO_Pin_12
 

Functions

void dma1_c4_irq_handler (void)
 
static void ADS8344_read_channel (void)
 
void imu_crista_arch_init (void)
 
void ADS8344_start (void)
 

Variables

static volatile uint8_t channel
 
static uint8_t buf_in [4]
 
static uint8_t buf_out [4]
 

Macro Definition Documentation

#define ADS8344Select ( )    GPIOB->BRR = GPIO_Pin_12

Definition at line 38 of file imu_crista_arch.c.

Referenced by ADS8344_start().

#define ADS8344Unselect ( )    GPIOB->BSRR = GPIO_Pin_12

Definition at line 37 of file imu_crista_arch.c.

Referenced by dma1_c4_irq_handler(), and imu_crista_arch_init().

#define POWER_MODE   (1 << 1 | 1)

Definition at line 34 of file imu_crista_arch.c.

Referenced by ADS8344_read_channel().

#define SGL_DIF   1

Definition at line 35 of file imu_crista_arch.c.

Referenced by ADS8344_read_channel().

Function Documentation

static void ADS8344_read_channel ( void  )
static

Definition at line 100 of file imu_crista_arch.c.

References buf_in, buf_out, channel, POWER_MODE, and SGL_DIF.

Referenced by ADS8344_start(), and dma1_c4_irq_handler().

+ Here is the caller graph for this function:

void ADS8344_start ( void  )

Definition at line 91 of file imu_crista_arch.c.

References ADS8344_read_channel(), ADS8344Select, channel, send_request(), SpiClearRti(), SpiEnable, and SpiEnableRti().

+ Here is the call graph for this function:

void dma1_c4_irq_handler ( void  )

Definition at line 157 of file imu_crista_arch.c.

References ADS8344_available, ADS8344_read_channel(), ADS8344_values, ADS8344Unselect, buf_in, and channel.

+ Here is the call graph for this function:

void imu_crista_arch_init ( void  )

Variable Documentation

uint8_t buf_in[4]
static

Definition at line 31 of file imu_crista_arch.c.

Referenced by ADS8344_read_channel(), and dma1_c4_irq_handler().

uint8_t buf_out[4]
static

Definition at line 32 of file imu_crista_arch.c.

Referenced by ADS8344_read_channel().

volatile uint8_t channel
static