Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
ak8963.c File Reference
#include "peripherals/ak8963.h"
#include "std.h"
+ Include dependency graph for ak8963.c:

Go to the source code of this file.

Macros

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

Functions

void ak8963_init (struct Ak8963 *ak, struct i2c_periph *i2c_p, uint8_t addr)
 Initialize AK8963 struct. More...
 
void ak8963_configure (struct Ak8963 *ak)
 
void ak8963_read (struct Ak8963 *ak)
 
void ak8963_event (struct Ak8963 *ak)
 

Detailed Description

Driver for the AKM AK8963 magnetometer.

Definition in file ak8963.c.

Macro Definition Documentation

◆ Int16FromBuf

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

Definition at line 94 of file ak8963.c.

Function Documentation

◆ ak8963_configure()

void ak8963_configure ( struct Ak8963 ak)

◆ ak8963_event()

◆ ak8963_init()

void ak8963_init ( struct Ak8963 ak,
struct i2c_periph i2c_p,
uint8_t  addr 
)

Initialize AK8963 struct.

Definition at line 34 of file ak8963.c.

References AK_CONF_UNINIT, Ak8963::data_available, Ak8963::i2c_p, Ak8963::i2c_trans, I2CTransDone, Ak8963::init_status, Ak8963::initialized, i2c_transaction::slave_addr, and i2c_transaction::status.

Referenced by imu_bebop_init(), imu_disco_init(), and mpu9250_i2c_init().

+ Here is the caller graph for this function:

◆ ak8963_read()

void ak8963_read ( struct Ak8963 ak)

Definition at line 83 of file ak8963.c.

References AK8963_REG_ST1, AK_STATUS_IDLE, i2c_transaction::buf, Ak8963::i2c_p, Ak8963::i2c_trans, i2c_transceive(), i2c_transaction::slave_addr, and Ak8963::status.

Referenced by ak8963_periodic(), and mpu9250_i2c_read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: