mpu9dof 2.0.0.0
Public function

Functions

void mpu9dof_cfg_setup (mpu9dof_cfg_t *cfg)
 Config Object Initialization function.
 
MPU9DOF_RETVAL mpu9dof_init (mpu9dof_t *ctx, mpu9dof_cfg_t *cfg)
 Initialization function.
 
void mpu9dof_default_cfg (mpu9dof_t *ctx)
 Click Default Configuration function.
 
void mpu9dof_generic_write (mpu9dof_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void mpu9dof_generic_read (mpu9dof_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void mpu9dof_write_data_mag (mpu9dof_t *ctx, uint8_t address, uint8_t write_command)
 Generic write data function.
 
uint8_t mpu9dof_read_data_mag (mpu9dof_t *ctx, uint8_t address)
 Generic read data function.
 
int16_t mpu9dof_get_axis (mpu9dof_t *ctx, uint8_t adr_reg_high)
 Function get low and high register data.
 
int16_t mpu9dof_get_axis_mag (mpu9dof_t *ctx, uint8_t adr_reg_low)
 Function get low and high register data.
 
void mpu9dof_read_gyro (mpu9dof_t *ctx, int16_t *gyro_x, int16_t *gyro_y, int16_t *gyro_z)
 Function read axis.
 
void mpu9dof_read_accel (mpu9dof_t *ctx, int16_t *accel_x, int16_t *accel_y, int16_t *accel_z)
 Function read axis.
 
void mpu9dof_read_mag (mpu9dof_t *ctx, int16_t *mag_x, int16_t *mag_y, int16_t *mag_z)
 Function read axis.
 
float mpu9dof_read_temperature (mpu9dof_t *ctx)
 Function read temperature data in degrees [ �C ].
 
uint8_t get_int_pin_state (mpu9dof_t *ctx)
 Get int pin state.
 
void adapter_turn_fsy_on (mpu9dof_t *ctx)
 Turn FSY on function.
 
void adapter_turn_fsy_off (mpu9dof_t *ctx)
 Turn FSY off function.
 

Detailed Description

Function Documentation

◆ adapter_turn_fsy_off()

void adapter_turn_fsy_off ( mpu9dof_t * ctx)

Turn FSY off function.

Parameters
ctxClick object.

@description Function is used to set FSY pin to 0.

◆ adapter_turn_fsy_on()

void adapter_turn_fsy_on ( mpu9dof_t * ctx)

Turn FSY on function.

Parameters
ctxClick object.

@description Function is used to set FSY pin to 1.

◆ get_int_pin_state()

uint8_t get_int_pin_state ( mpu9dof_t * ctx)

Get int pin state.

Parameters
ctxClick object.
Returns
Int_pin state

@description Function read int_pin state.

◆ mpu9dof_cfg_setup()

void mpu9dof_cfg_setup ( mpu9dof_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ mpu9dof_default_cfg()

void mpu9dof_default_cfg ( mpu9dof_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Mpu9Dof click.

◆ mpu9dof_generic_read()

void mpu9dof_generic_read ( mpu9dof_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufOutput data buf.
lenNumber of the bytes to be read

@description This function reads data from the desired register.

◆ mpu9dof_generic_write()

void mpu9dof_generic_write ( mpu9dof_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function writes data to the desired register.

◆ mpu9dof_get_axis()

int16_t mpu9dof_get_axis ( mpu9dof_t * ctx,
uint8_t adr_reg_high )

Function get low and high register data.

Parameters
ctxClick object.
adr_reg_highHigh data register address.
Returns
16-bit value ( low and high data )

@description Function get data from two MPU-9150 XL G register

◆ mpu9dof_get_axis_mag()

int16_t mpu9dof_get_axis_mag ( mpu9dof_t * ctx,
uint8_t adr_reg_low )

Function get low and high register data.

Parameters
ctxClick object.
adr_reg_lowLow data register address.
Returns
16-bit value ( low and high data )

@description Function get data from two MPU-9150 MAG register

◆ mpu9dof_init()

MPU9DOF_RETVAL mpu9dof_init ( mpu9dof_t * ctx,
mpu9dof_cfg_t * cfg )

Initialization function.

Parameters
mpu9dofClick object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.

◆ mpu9dof_read_accel()

void mpu9dof_read_accel ( mpu9dof_t * ctx,
int16_t * accel_x,
int16_t * accel_y,
int16_t * accel_z )

Function read axis.

Parameters
ctxClick object.
gyroXPointer to read Gyro X-axis data
gyroYPointer to read Gyro Y-axis data
gyroZPointer to read Gyro Z-axis data

@description Function read Gyro X-axis, Y-axis and Z-axis axis.

◆ mpu9dof_read_data_mag()

uint8_t mpu9dof_read_data_mag ( mpu9dof_t * ctx,
uint8_t address )

Generic read data function.

Parameters
ctxClick object.
addressRegister address.
Returns
Data from addressed register in MPU-9150 MAG

@description Function read byte of data from register address of MPU-9150 MAG

◆ mpu9dof_read_gyro()

void mpu9dof_read_gyro ( mpu9dof_t * ctx,
int16_t * gyro_x,
int16_t * gyro_y,
int16_t * gyro_z )

Function read axis.

Parameters
ctxClick object.
gyroXPointer to read Gyro X-axis data
gyroYPointer to read Gyro Y-axis data
gyroZPointer to read Gyro Z-axis data

@description Function read Gyro X-axis, Y-axis and Z-axis axis.

◆ mpu9dof_read_mag()

void mpu9dof_read_mag ( mpu9dof_t * ctx,
int16_t * mag_x,
int16_t * mag_y,
int16_t * mag_z )

Function read axis.

Parameters
ctxClick object.
magXPointer to read Accel X-axis data
magYPointer to read Accel Y-axis data
magZPointer to read Accel Z-axis data

@description Function read Magnetometar X-axis, Y-axis and Z-axis axis.

◆ mpu9dof_read_temperature()

float mpu9dof_read_temperature ( mpu9dof_t * ctx)

Function read temperature data in degrees [ �C ].

Parameters
ctxClick object.
Returns
Temperature in degrees [ �C ]

@description Function read temperature data

◆ mpu9dof_write_data_mag()

void mpu9dof_write_data_mag ( mpu9dof_t * ctx,
uint8_t address,
uint8_t write_command )

Generic write data function.

Parameters
ctxClick object.
addressRegister address.
write_commandCommand to write.

@description Function write byte of data to MPU-9150 MAG