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

◆ data_transfer_callback()

void MPU6000::data_transfer_callback ( )

Definition at line 104 of file mpu6000.cpp.

◆ exti_cb()

void MPU6000::exti_cb ( )

Definition at line 130 of file mpu6000.cpp.

◆ init()

void MPU6000::init ( SPI spi_drv)

Definition at line 52 of file mpu6000.cpp.

◆ is_initialized()

bool MPU6000::is_initialized ( )
inline

Definition at line 169 of file mpu6000.h.

◆ new_data()

bool MPU6000::new_data ( )

Definition at line 137 of file mpu6000.cpp.

◆ read()

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

Definition at line 118 of file mpu6000.cpp.

◆ write()

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

Definition at line 43 of file mpu6000.cpp.

Member Data Documentation

◆ acc_

float MPU6000::acc_[3]
private

Definition at line 180 of file mpu6000.h.

◆ accel_scale_

float MPU6000::accel_scale_
private

Definition at line 178 of file mpu6000.h.

◆ cs_

GPIO MPU6000::cs_
private

Definition at line 177 of file mpu6000.h.

◆ exti_

GPIO MPU6000::exti_
private

Definition at line 176 of file mpu6000.h.

◆ gyro_

float MPU6000::gyro_[3]
private

Definition at line 181 of file mpu6000.h.

◆ gyro_scale_

float MPU6000::gyro_scale_
private

Definition at line 179 of file mpu6000.h.

◆ imu_timestamp_

uint64_t MPU6000::imu_timestamp_ = 0
private

Definition at line 174 of file mpu6000.h.

◆ new_data_

bool MPU6000::new_data_ = false
private

Definition at line 173 of file mpu6000.h.

◆ spi

SPI* MPU6000::spi {nullptr}
private

Definition at line 175 of file mpu6000.h.

◆ temp_

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 Mon Feb 28 2022 23:36:18