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.i2c.c File Reference
#include "peripherals/adxl345.extra_i2c.h"
#include "std.h"
+ Include dependency graph for adxl345.i2c.c:

Go to the source code of this file.

Macros

#define ADXL_CONF_UNINIT   0
 
#define ADXL_CONF_RATE   1
 
#define ADXL_CONF_POWER   2
 
#define ADXL_CONF_INT   3
 
#define ADXL_CONF_FORMAT   4
 
#define ADXL_CONF_DONE   5
 
#define Int16FromBuf(_buf, _idx)   ((int16_t)((_buf[_idx+1]<<8) | _buf[_idx]))
 

Functions

void adxl345_init (void)
 
static void adxl345_send_config (void)
 
void adxl345_configure (void)
 
void adxl345_read (void)
 
void adxl345_event (void)
 

Variables

volatile bool_t adxl345_data_available
 
struct Int16Vect3 adxl345_data
 
struct i2c_transaction adxl345_i2c_trans
 
bool_t adxl345_initialized
 
uint8_t adxl345_init_status
 

Macro Definition Documentation

#define ADXL_CONF_DONE   5

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

Referenced by adxl345_send_config().

#define ADXL_CONF_FORMAT   4

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

Referenced by adxl345_send_config().

#define ADXL_CONF_INT   3

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

Referenced by adxl345_send_config().

#define ADXL_CONF_POWER   2

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

Referenced by adxl345_send_config().

#define ADXL_CONF_RATE   1

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

Referenced by adxl345_send_config().

#define ADXL_CONF_UNINIT   0

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

Referenced by adxl345_configure(), adxl345_event(), and adxl345_init().

#define Int16FromBuf (   _buf,
  _idx 
)    ((int16_t)((_buf[_idx+1]<<8) | _buf[_idx]))

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

Referenced by adxl345_event().

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().

struct i2c_transaction adxl345_i2c_trans
uint8_t adxl345_init_status

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

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

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().