Paparazzi UAS  v5.8.2_stable-0-g6260b7c
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 "LPC21xx.h"
#include "armVIC.h"
#include "ssp_hw.h"
#include <BOARD_CONFIG>
+ Include dependency graph for imu_crista_arch.c:

Go to the source code of this file.

Macros

#define ADS8344_SS_IODIR   IO0DIR
 
#define ADS8344_SS_IOSET   IO0SET
 
#define ADS8344_SS_IOCLR   IO0CLR
 
#define ADS8344_SS_PIN   20
 
#define ADS8344Select()   SetBit(ADS8344_SS_IOCLR,ADS8344_SS_PIN)
 
#define ADS8344Unselect()   SetBit(ADS8344_SS_IOSET,ADS8344_SS_PIN)
 
#define POWER_MODE   (1 << 1 | 1)
 
#define SGL_DIF   1
 
#define SSP_DSS   0x07 << 0 /* data size : 8 bits */
 
#define SSP_FRF   0x00 << 4 /* frame format : SPI */
 
#define SSP_CPOL   0x00 << 6 /* clock polarity : idle low */
 
#define SSP_CPHA   0x00 << 7 /* clock phase : 1 */
 
#define SSP_SCR   0x09 << 8 /* serial clock rate : 1MHz */
 
#define SSP_LBM   0x00 << 0 /* loopback mode : disabled */
 
#define SSP_SSE   0x00 << 1 /* SSP enable : disabled */
 
#define SSP_MS   0x00 << 2 /* master slave mode : master */
 
#define SSP_SOD   0x00 << 3 /* slave output disable : disabled */
 

Functions

static void SPI1_ISR (void)
 
void imu_crista_arch_init (void)
 
static void read_values (void)
 
static void send_request (void)
 
void ADS8344_start (void)
 

Variables

static uint8_t channel
 

Macro Definition Documentation

#define ADS8344_SS_IOCLR   IO0CLR

Definition at line 31 of file imu_crista_arch.c.

#define ADS8344_SS_IODIR   IO0DIR

Definition at line 29 of file imu_crista_arch.c.

Referenced by imu_crista_arch_init().

#define ADS8344_SS_IOSET   IO0SET

Definition at line 30 of file imu_crista_arch.c.

#define ADS8344_SS_PIN   20

Definition at line 32 of file imu_crista_arch.c.

Referenced by imu_crista_arch_init().

#define ADS8344Select ( )    SetBit(ADS8344_SS_IOCLR,ADS8344_SS_PIN)

Definition at line 34 of file imu_crista_arch.c.

Referenced by ADS8344_start().

#define ADS8344Unselect ( )    SetBit(ADS8344_SS_IOSET,ADS8344_SS_PIN)

Definition at line 35 of file imu_crista_arch.c.

Referenced by imu_crista_arch_init(), and SPI1_ISR().

#define POWER_MODE   (1 << 1 | 1)

Definition at line 37 of file imu_crista_arch.c.

Referenced by send_request().

#define SGL_DIF   1

Definition at line 38 of file imu_crista_arch.c.

Referenced by send_request().

#define SSP_CPHA   0x00 << 7 /* clock phase : 1 */

Definition at line 44 of file imu_crista_arch.c.

Referenced by imu_crista_arch_init().

#define SSP_CPOL   0x00 << 6 /* clock polarity : idle low */

Definition at line 43 of file imu_crista_arch.c.

Referenced by imu_crista_arch_init().

#define SSP_DSS   0x07 << 0 /* data size : 8 bits */

Definition at line 41 of file imu_crista_arch.c.

Referenced by imu_crista_arch_init().

#define SSP_FRF   0x00 << 4 /* frame format : SPI */

Definition at line 42 of file imu_crista_arch.c.

Referenced by imu_crista_arch_init().

#define SSP_LBM   0x00 << 0 /* loopback mode : disabled */

Definition at line 48 of file imu_crista_arch.c.

Referenced by imu_crista_arch_init().

#define SSP_MS   0x00 << 2 /* master slave mode : master */

Definition at line 50 of file imu_crista_arch.c.

Referenced by imu_crista_arch_init().

#define SSP_SCR   0x09 << 8 /* serial clock rate : 1MHz */

Definition at line 45 of file imu_crista_arch.c.

Referenced by imu_crista_arch_init().

#define SSP_SOD   0x00 << 3 /* slave output disable : disabled */

Definition at line 51 of file imu_crista_arch.c.

Referenced by imu_crista_arch_init().

#define SSP_SSE   0x00 << 1 /* SSP enable : disabled */

Definition at line 49 of file imu_crista_arch.c.

Function Documentation

void ADS8344_start ( void  )

Definition at line 101 of file imu_crista_arch.c.

References ADS8344Select, send_request(), SSP_ClearRti, SSP_Enable, and SSP_EnableRti.

+ Here is the call graph for this function:

void imu_crista_arch_init ( void  )

Definition at line 58 of file imu_crista_arch.c.

Referenced by imu_impl_init().

+ Here is the caller graph for this function:

static void read_values ( void  )
inlinestatic

Definition at line 83 of file imu_crista_arch.c.

References ADS8344_values, channel, foo, and SSPDR.

Referenced by SPI1_ISR().

+ Here is the caller graph for this function:

static void send_request ( void  )
inlinestatic

Definition at line 92 of file imu_crista_arch.c.

References POWER_MODE, SGL_DIF, and SSP_Send.

Referenced by ADS8344_start(), and SPI1_ISR().

+ Here is the caller graph for this function:

void SPI1_ISR ( void  )
static

Definition at line 110 of file imu_crista_arch.c.

References ADS8344_available, ADS8344Unselect, ISR_ENTRY, ISR_EXIT, read_values(), send_request(), SSP_ClearRti, TRUE, and VICVectAddr.

Referenced by imu_crista_arch_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

uint8_t channel
static

Definition at line 54 of file imu_crista_arch.c.

Referenced by read_values().