Public Member Functions | Private Member Functions | Private Attributes | List of all members
MPU6000 Class Reference

#include <mpu6000.h>

Public Member Functions

void data_transfer_callback ()
 
void exti_cb ()
 
void init (SPI *spi_drv)
 
bool is_initialized ()
 
bool new_data ()
 
void read (float *accel_data, float *gyro_data, float *temp_data, uint64_t *time_us)
 

Private Member Functions

void write (uint8_t reg, uint8_t data)
 

Private Attributes

float acc_ [3]
 
float accel_scale_
 
GPIO cs_
 
GPIO exti_
 
float gyro_ [3]
 
float gyro_scale_
 
uint64_t imu_timestamp_ = 0
 
bool new_data_ = false
 
SPIspi {nullptr}
 
float temp_
 

Detailed Description

Definition at line 160 of file mpu6000.h.

Member Function Documentation

void MPU6000::data_transfer_callback ( )

Definition at line 104 of file mpu6000.cpp.

void MPU6000::exti_cb ( )

Definition at line 130 of file mpu6000.cpp.

void MPU6000::init ( SPI spi_drv)

Definition at line 52 of file mpu6000.cpp.

bool MPU6000::is_initialized ( )
inline

Definition at line 169 of file mpu6000.h.

bool MPU6000::new_data ( )

Definition at line 137 of file mpu6000.cpp.

void MPU6000::read ( float *  accel_data,
float *  gyro_data,
float *  temp_data,
uint64_t *  time_us 
)

Definition at line 118 of file mpu6000.cpp.

void MPU6000::write ( uint8_t  reg,
uint8_t  data 
)
private

Definition at line 43 of file mpu6000.cpp.

Member Data Documentation

float MPU6000::acc_[3]
private

Definition at line 180 of file mpu6000.h.

float MPU6000::accel_scale_
private

Definition at line 178 of file mpu6000.h.

GPIO MPU6000::cs_
private

Definition at line 177 of file mpu6000.h.

GPIO MPU6000::exti_
private

Definition at line 176 of file mpu6000.h.

float MPU6000::gyro_[3]
private

Definition at line 181 of file mpu6000.h.

float MPU6000::gyro_scale_
private

Definition at line 179 of file mpu6000.h.

uint64_t MPU6000::imu_timestamp_ = 0
private

Definition at line 174 of file mpu6000.h.

bool MPU6000::new_data_ = false
private

Definition at line 173 of file mpu6000.h.

SPI* MPU6000::spi {nullptr}
private

Definition at line 175 of file mpu6000.h.

float MPU6000::temp_
private

Definition at line 182 of file mpu6000.h.


The documentation for this class was generated from the following files:


rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Thu Apr 15 2021 05:07:58