lsm303agr  2.0.0.0
Data Structures | Macros | Functions
lsm303agr.h File Reference

This file contains API for LSM303AGR Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  lsm303agr_t
 Click ctx object definition. More...
 
struct  lsm303agr_cfg_t
 Click configuration structure definition. More...
 

Macros

#define LSM303AGR_MAP_MIKROBUS(cfg, mikrobus)
 
#define LSM303AGR_RETVAL   uint8_t
 
#define LSM303AGR_OK   0x00
 
#define LSM303AGR_INIT_ERROR   0xFF
 

Functions

void lsm303agr_cfg_setup (lsm303agr_cfg_t *cfg)
 Config Object Initialization function. More...
 
LSM303AGR_RETVAL lsm303agr_init (lsm303agr_t *ctx, lsm303agr_cfg_t *cfg)
 Initialization function. More...
 
void lsm303agr_default_cfg (lsm303agr_t *ctx)
 Click Default Configuration function. More...
 
void lsm303agr_read_data (lsm303agr_t *ctx, uint8_t reg_addr, uint8_t *read_buf, uint8_t read_len)
 Generic read data function. More...
 
void lsm303agr_write_data (lsm303agr_t *ctx, uint8_t reg_addr, uint8_t *write_buf, uint8_t write_len)
 Generic write data function. More...
 
float lsm303agr_get_acc_axis_x (lsm303agr_t *ctx)
 Reading the raw X axis data and calculating the value : More...
 
float lsm303agr_get_acc_axis_y (lsm303agr_t *ctx)
 Reading the raw Y axis data and calculating the value : More...
 
float lsm303agr_get_acc_axis_z (lsm303agr_t *ctx)
 Reading the raw Z axis data and calculating the value : More...
 
float lsm303agr_get_mag_axis_x (lsm303agr_t *ctx)
 Reading the raw X axis data and calculating the value : More...
 
float lsm303agr_get_mag_axis_y (lsm303agr_t *ctx)
 Reading the raw Y axis data and calculating the value : More...
 
float lsm303agr_get_mag_axis_z (lsm303agr_t *ctx)
 Reading the raw Z axis data and calculating the value : More...
 
void lsm303agr_accelerometer_init (lsm303agr_t *ctx)
 Accelerometer init. More...
 
void lsm303agr_magnetometer_init (lsm303agr_t *ctx)
 Magnetometer init. More...
 

Detailed Description

This file contains API for LSM303AGR Click driver.