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
adxl345_i2c.h File Reference

Driver for the accelerometer ADXL345 from Analog Devices using I2C. More...

#include "std.h"
#include "math/pprz_algebra_int.h"
#include "mcu_periph/i2c.h"
#include "peripherals/adxl345.h"
+ Include dependency graph for adxl345_i2c.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Adxl345_I2c
 

Functions

void adxl345_i2c_init (struct Adxl345_I2c *adxl, struct i2c_periph *i2c_p, uint8_t addr)
 
void adxl345_i2c_start_configure (struct Adxl345_I2c *adxl)
 Start configuration if not already done. More...
 
void adxl345_i2c_read (struct Adxl345_I2c *adxl)
 
void adxl345_i2c_event (struct Adxl345_I2c *adxl)
 
static void adxl345_i2c_periodic (struct Adxl345_I2c *adxl)
 convenience function: read or start configuration if not already initialized More...
 

Detailed Description

Driver for the accelerometer ADXL345 from Analog Devices using I2C.

Definition in file adxl345_i2c.h.

Function Documentation

void adxl345_i2c_init ( struct Adxl345_I2c adxl,
struct i2c_periph i2c_p,
uint8_t  addr 
)

Definition at line 36 of file adxl345_i2c.c.

References adxl345_set_default_config(), ADXL_CONF_UNINIT, Adxl345_I2c::config, FALSE, Adxl345_I2c::i2c_p, Adxl345_I2c::i2c_trans, I2CTransDone, Adxl345_I2c::init_status, Adxl345_I2c::initialized, i2c_transaction::slave_addr, and i2c_transaction::status.

Referenced by imu_impl_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void adxl345_i2c_periodic ( struct Adxl345_I2c adxl)
inlinestatic

convenience function: read or start configuration if not already initialized

Definition at line 59 of file adxl345_i2c.h.

References adxl345_i2c_read(), adxl345_i2c_start_configure(), and Adxl345_I2c::initialized.

Referenced by imu_periodic().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void adxl345_i2c_read ( struct Adxl345_I2c adxl)
void adxl345_i2c_start_configure ( struct Adxl345_I2c adxl)

Start configuration if not already done.

Definition at line 90 of file adxl345_i2c.c.

References adxl345_i2c_send_config(), ADXL_CONF_UNINIT, Adxl345_I2c::i2c_trans, I2CTransDone, I2CTransSuccess, Adxl345_I2c::init_status, and i2c_transaction::status.

Referenced by adxl345_i2c_periodic().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: