Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ami601.h File Reference
#include "std.h"
#include "mcu_periph/i2c.h"
+ Include dependency graph for ami601.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define AMI601_NB_CHAN   6
 
#define AMI601_IDLE   0
 
#define AMI601_SENDING_REQ   1
 
#define AMI601_WAITING_MEASURE   2
 
#define AMI601_READING_MEASURE   3
 
#define AMI601_DATA_AVAILABLE   4
 
#define AMI601_SLAVE_ADDR   0x60
 
#define AMI601_IT   TIR_MR1I
 
#define AMI601_ISR()   {}
 
#define AMI601Event(_handler)
 

Functions

void ami601_init (void)
 
void ami601_read (void)
 
void ami601_periodic (void)
 
void ami601_scale_measures (void)
 

Variables

uint16_t ami601_values [AMI601_NB_CHAN]
 
uint8_t ami601_foo1
 
uint8_t ami601_foo2
 
uint8_t ami601_foo3
 
volatile uint8_t ami601_status
 
struct i2c_transaction ami601_i2c_trans
 
volatile uint32_t ami601_nb_err
 

Macro Definition Documentation

#define AMI601_DATA_AVAILABLE   4

Definition at line 23 of file ami601.h.

#define AMI601_IDLE   0

Definition at line 19 of file ami601.h.

Referenced by ami601_init(), and ami601_read().

#define AMI601_ISR ( )    {}

Definition at line 30 of file ami601.h.

Referenced by TIMER0_ISR().

#define AMI601_IT   TIR_MR1I

Definition at line 29 of file ami601.h.

#define AMI601_NB_CHAN   6

Definition at line 13 of file ami601.h.

Referenced by ami601_init().

#define AMI601_READING_MEASURE   3

Definition at line 22 of file ami601.h.

#define AMI601_SENDING_REQ   1

Definition at line 20 of file ami601.h.

Referenced by ami601_read().

#define AMI601_SLAVE_ADDR   0x60

Definition at line 28 of file ami601.h.

Referenced by ami601_init().

#define AMI601_WAITING_MEASURE   2

Definition at line 21 of file ami601.h.

#define AMI601Event (   _handler)
Value:
{ \
switch (ami601_status) { \
} \
break; \
break; \
for (i=0; i< AMI601_NB_CHAN; i++) { \
ami601_values[i] += ami601_i2c_trans.buf[3 + 2 * i + 1] * 256;\
} \
_handler(); \
} \
break; \
} \
}
#define AMI601_NB_CHAN
Definition: ami601.h:13
bool_t i2c_submit(struct i2c_periph *p, struct i2c_transaction *t)
Definition: i2c_arch.c:333
#define AMI601_WAITING_MEASURE
Definition: ami601.h:21
#define AMI601_SENDING_REQ
Definition: ami601.h:20
#define AMI601_READING_MEASURE
Definition: ami601.h:22
struct i2c_transaction ami601_i2c_trans
Definition: ami601.c:9
volatile uint8_t ami601_status
Definition: ami601.c:8
uint16_t ami601_values[AMI601_NB_CHAN]
Definition: ami601.c:6
if(PrimarySpektrumState.SpektrumTimer)--PrimarySpektrumState.SpektrumTimer
uint8_t ami601_foo2
Definition: ami601.c:4
uint8_t ami601_foo3
Definition: ami601.c:5
enum I2CTransactionStatus status
Definition: i2c.h:83
volatile uint8_t buf[I2C_BUF_LEN]
Definition: i2c.h:82
uint16_t len_r
Definition: i2c.h:80
unsigned char uint8_t
Definition: types.h:14
#define AMI601_DATA_AVAILABLE
Definition: ami601.h:23
enum I2CTransactionType type
Definition: i2c.h:78
Definition: i2c.h:46
uint8_t ami601_foo1
Definition: ami601.c:3

Definition at line 38 of file ami601.h.

Function Documentation

void ami601_init ( void  )

Definition at line 12 of file ami601.c.

References ami601_i2c_trans, AMI601_IDLE, AMI601_NB_CHAN, ami601_nb_err, AMI601_SLAVE_ADDR, ami601_status, ami601_values, I2CTransSuccess, i2c_transaction::slave_addr, and i2c_transaction::status.

Referenced by imu_impl_init().

+ Here is the caller graph for this function:

void ami601_periodic ( void  )
void ami601_read ( void  )

Definition at line 25 of file ami601.c.

References ami601_i2c_trans, AMI601_IDLE, ami601_nb_err, AMI601_SENDING_REQ, ami601_status, i2c_transaction::buf, i2c_submit(), I2CTransTx, i2c_transaction::len_w, and i2c_transaction::type.

Referenced by imu_periodic().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ami601_scale_measures ( void  )

Variable Documentation

uint8_t ami601_foo1

Definition at line 3 of file ami601.c.

uint8_t ami601_foo2

Definition at line 4 of file ami601.c.

uint8_t ami601_foo3

Definition at line 5 of file ami601.c.

struct i2c_transaction ami601_i2c_trans

Definition at line 9 of file ami601.c.

Referenced by ami601_init(), and ami601_read().

volatile uint32_t ami601_nb_err

Definition at line 10 of file ami601.c.

Referenced by ami601_init(), and ami601_read().

volatile uint8_t ami601_status

Definition at line 8 of file ami601.c.

Referenced by ami601_init(), and ami601_read().

uint16_t ami601_values[AMI601_NB_CHAN]

Definition at line 6 of file ami601.c.

Referenced by ami601_init().