Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
hmc58xx.c File Reference
#include "peripherals/hmc58xx.h"
#include "std.h"
+ Include dependency graph for hmc58xx.c:

Go to the source code of this file.

Macros

#define HMC_CONF_UNINIT   0
 
#define HMC_CONF_CRA   1
 
#define HMC_CONF_CRB   2
 
#define HMC_CONF_MODE   3
 
#define HMC_CONF_DONE   4
 
#define Int16FromBuf(_buf, _idx)   ((int16_t)((_buf[_idx]<<8) | _buf[_idx+1]))
 

Functions

void hmc58xx_init (void)
 
static void hmc58xx_send_config (void)
 
void hmc58xx_configure (void)
 
void hmc58xx_read (void)
 
void hmc58xx_event (void)
 

Variables

volatile bool_t hmc58xx_data_available
 
struct Int16Vect3 hmc58xx_data
 
struct i2c_transaction hmc58xx_i2c_trans
 
bool_t hmc58xx_initialized
 
uint8_t hmc58xx_init_status
 

Macro Definition Documentation

#define HMC_CONF_CRA   1

Definition at line 30 of file hmc58xx.c.

Referenced by hmc58xx_send_config().

#define HMC_CONF_CRB   2

Definition at line 31 of file hmc58xx.c.

Referenced by hmc58xx_send_config().

#define HMC_CONF_DONE   4

Definition at line 33 of file hmc58xx.c.

Referenced by hmc58xx_send_config().

#define HMC_CONF_MODE   3

Definition at line 32 of file hmc58xx.c.

Referenced by hmc58xx_send_config().

#define HMC_CONF_UNINIT   0

Definition at line 29 of file hmc58xx.c.

Referenced by hmc58xx_configure(), hmc58xx_event(), and hmc58xx_init().

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

Definition at line 107 of file hmc58xx.c.

Referenced by hmc58xx_event().

Function Documentation

void hmc58xx_configure ( void  )

Definition at line 88 of file hmc58xx.c.

References hmc58xx_i2c_trans, hmc58xx_init_status, hmc58xx_send_config(), HMC_CONF_UNINIT, I2CTransDone, I2CTransSuccess, and i2c_transaction::status.

+ Here is the call graph for this function:

void hmc58xx_event ( void  )
void hmc58xx_init ( void  )

Definition at line 48 of file hmc58xx.c.

References FALSE, HMC58XX_ADDR, hmc58xx_i2c_trans, hmc58xx_init_status, hmc58xx_initialized, HMC_CONF_UNINIT, 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 hmc58xx_data

Definition at line 39 of file hmc58xx.c.

Referenced by hmc58xx_event(), imu_navgo_event(), and mag_hmc58xx_report().

volatile bool_t hmc58xx_data_available

Definition at line 37 of file hmc58xx.c.

Referenced by hmc58xx_event(), and imu_navgo_event().

struct i2c_transaction hmc58xx_i2c_trans
uint8_t hmc58xx_init_status

Definition at line 44 of file hmc58xx.c.

Referenced by hmc58xx_configure(), hmc58xx_event(), hmc58xx_init(), and hmc58xx_send_config().

bool_t hmc58xx_initialized

Definition at line 43 of file hmc58xx.c.

Referenced by hmc58xx_event(), hmc58xx_init(), hmc58xx_read(), and hmc58xx_send_config().