Paparazzi UAS  v4.2.2_stable-4-gcc32f65
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
adxl345.extra_i2c.h File Reference
#include "std.h"
#include "math/pprz_algebra_int.h"
#include "mcu_periph/i2c.h"
#include "peripherals/adxl345.h"
+ Include dependency graph for adxl345.extra_i2c.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ADXL345_BW_RATE   0x0a
 
#define ADXL345_POWER_CTL_MEASURE   0x1
 
#define ADXL345_INT_ENABLE   0x0
 
#define ADXL345_DATA_FORMAT_FULL_RES   0x1
 
#define ADXL345_DATA_FORMAT_JUSTIFY   0x0
 
#define ADXL345_DATA_FORMAT_RANGE   0x3
 
#define ADXL345_POWER_CTL   (ADXL345_POWER_CTL_MEASURE<<3)
 
#define ADXL345_DATA_FORMAT   ((ADXL345_DATA_FORMAT_FULL_RES<<3)|(ADXL345_DATA_FORMAT_JUSTIFY<<2)|(ADXL345_DATA_FORMAT_RANGE))
 
#define ADXL345_I2C_ADDR   ADXL345_ADDR
 
#define ADXL345_I2C_DEVICE   i2c1
 
#define Adxl345Periodic()
 
#define AccelEvent(_handler)
 

Functions

void adxl345_init (void)
 
void adxl345_configure (void)
 
void adxl345_read (void)
 
void adxl345_event (void)
 

Variables

bool_t adxl345_initialized
 
volatile bool_t adxl345_data_available
 
struct Int16Vect3 adxl345_data
 
struct i2c_transaction adxl345_trans
 

Macro Definition Documentation

#define AccelEvent (   _handler)
Value:
{ \
_handler(); \
} \
}
void adxl345_event(void)
Definition: adxl345.i2c.c:116
volatile bool_t adxl345_data_available
Definition: adxl345.i2c.c:38

Definition at line 93 of file adxl345.extra_i2c.h.

#define ADXL345_BW_RATE   0x0a

Definition at line 39 of file adxl345.extra_i2c.h.

Referenced by adxl345_send_config(), and imu_periodic().

Definition at line 58 of file adxl345.extra_i2c.h.

Referenced by adxl345_send_config().

#define ADXL345_DATA_FORMAT_FULL_RES   0x1

Definition at line 48 of file adxl345.extra_i2c.h.

#define ADXL345_DATA_FORMAT_JUSTIFY   0x0

Definition at line 51 of file adxl345.extra_i2c.h.

#define ADXL345_DATA_FORMAT_RANGE   0x3

Definition at line 54 of file adxl345.extra_i2c.h.

#define ADXL345_I2C_ADDR   ADXL345_ADDR

Definition at line 62 of file adxl345.extra_i2c.h.

Referenced by adxl345_read(), and adxl345_send_config().

#define ADXL345_I2C_DEVICE   i2c1

Definition at line 67 of file adxl345.extra_i2c.h.

Referenced by adxl345_read(), and adxl345_send_config().

#define ADXL345_INT_ENABLE   0x0

Definition at line 45 of file adxl345.extra_i2c.h.

Referenced by adxl345_send_config().

#define ADXL345_POWER_CTL   (ADXL345_POWER_CTL_MEASURE<<3)

Definition at line 57 of file adxl345.extra_i2c.h.

Referenced by adxl345_send_config().

#define ADXL345_POWER_CTL_MEASURE   0x1

Definition at line 42 of file adxl345.extra_i2c.h.

#define Adxl345Periodic ( )
Value:
{ \
}
void adxl345_read(void)
Definition: adxl345.i2c.c:106
void adxl345_configure(void)
Definition: adxl345.i2c.c:95
bool_t adxl345_initialized
Definition: adxl345.i2c.c:44

Definition at line 88 of file adxl345.extra_i2c.h.

Referenced by imu_periodic().

Function Documentation

void adxl345_configure ( void  )

Definition at line 95 of file adxl345.i2c.c.

References adxl345_i2c_trans, adxl345_init_status, adxl345_send_config(), ADXL_CONF_UNINIT, I2CTransDone, I2CTransSuccess, and i2c_transaction::status.

+ Here is the call graph for this function:

void adxl345_event ( void  )
void adxl345_init ( void  )

Definition at line 49 of file adxl345.i2c.c.

References ADXL345_ADDR, adxl345_i2c_trans, adxl345_init_status, adxl345_initialized, ADXL_CONF_UNINIT, FALSE, I2CTransDone, i2c_transaction::slave_addr, and i2c_transaction::status.

Referenced by imu_impl_init().

+ Here is the caller graph for this function:

Variable Documentation

struct Int16Vect3 adxl345_data

Definition at line 40 of file adxl345.i2c.c.

Referenced by adxl345_event(), imu_navgo_event(), and imu_umarim_event().

volatile bool_t adxl345_data_available

Definition at line 38 of file adxl345.i2c.c.

Referenced by adxl345_event(), imu_navgo_event(), and imu_umarim_event().

bool_t adxl345_initialized

Definition at line 44 of file adxl345.i2c.c.

Referenced by adxl345_event(), adxl345_init(), adxl345_read(), and adxl345_send_config().

struct i2c_transaction adxl345_trans