Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ist8310.c File Reference

Driver for the Isentek IST8310 magnetometer. More...

#include "peripherals/ist8310.h"
#include "std.h"
+ Include dependency graph for ist8310.c:

Go to the source code of this file.

Macros

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

Functions

void ist8310_init (struct IST8310 *ist, struct i2c_periph *i2c_p, uint8_t addr)
 Initialize IST8310 struct.
 
void ist8310_configure (struct IST8310 *ist)
 
void ist8310_read (struct IST8310 *ist)
 
void ist8310_event (struct IST8310 *ist)
 

Detailed Description

Driver for the Isentek IST8310 magnetometer.

Definition in file ist8310.c.

Macro Definition Documentation

◆ Int16FromBuf

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

Definition at line 110 of file ist8310.c.

Function Documentation

◆ ist8310_configure()

void ist8310_configure ( struct IST8310 ist)

Definition at line 46 of file ist8310.c.

References foo, i2c_transmit(), I2CTransDone, I2CTransFailed, I2CTransSuccess, IST8310_CNTL1_ODR_SINGLE, IST8310_CNTL3_SAMPAVG_16, IST8310_CNTL4_SRPD, IST8310_REG_CNTL1, IST8310_REG_CNTL3, IST8310_REG_CNTL4, IST_CONF_CNTL1, IST_CONF_CNTL3, IST_CONF_CNTL4, and IST_CONF_UNINIT.

Referenced by ist8310_periodic().

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

◆ ist8310_event()

void ist8310_event ( struct IST8310 ist)

Definition at line 111 of file ist8310.c.

References foo, i2c_transceive(), I2CTransDone, I2CTransFailed, I2CTransSuccess, Int16FromBuf, IST8310_REG_DATA_XL, IST_STATUS_IDLE, and IST_STATUS_READ.

Referenced by mag_ist8310_module_event().

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

◆ ist8310_init()

void ist8310_init ( struct IST8310 ist,
struct i2c_periph i2c_p,
uint8_t  addr 
)

Initialize IST8310 struct.

Definition at line 34 of file ist8310.c.

References foo, I2CTransDone, IST_CONF_UNINIT, and i2c_periph::status.

Referenced by mag_ist8310_module_init().

+ Here is the caller graph for this function:

◆ ist8310_read()

void ist8310_read ( struct IST8310 ist)

Definition at line 98 of file ist8310.c.

References foo, i2c_transceive(), IST8310_CNTL1_ODR_SINGLE, IST8310_REG_CNTL1, and IST_STATUS_IDLE.

Referenced by ist8310_periodic().

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