drv_mpu6050.h
Go to the documentation of this file.
1 /*
2  drv_mpu6050.h : driver for Invensense MPU6050
3 
4  Adapted from https://github.com/multiwii/baseflight/blob/master/src/drv_mpu.h
5 
6  This file is part of BreezySTM32.
7 
8  BreezySTM32 is free software: you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation, either version 3 of the License, or
11  (at your option) any later version.
12 
13  BreezySTM32 is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with BreezySTM32. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 #include "drv_i2c.h"
23 
24 #pragma once
25 
26 
27 void mpu6050_init(bool enableInterrupt, uint16_t * acc1G, float * gyroScale, int boardVersion);
28 void mpu6050_register_interrupt_cb(void (*functionPtr)(void));
29 
30 // Blocking Read Functions
31 bool mpu6050_new_data();
32 void mpu6050_read_all(int16_t *accData, int16_t *gyroData, int16_t* tempData, uint64_t* time_us);
33 void mpu6050_read_accel(int16_t *accData);
34 void mpu6050_read_gyro(int16_t *gyroData);
35 void mpu6050_read_temperature(int16_t * tempData);
36 
37 // Asynchronous Read Functions
38 void mpu6050_request_async_accel_read(int16_t *accData, volatile uint8_t *status_);
39 void mpu6050_request_async_gyro_read(int16_t *gyroData, volatile uint8_t *status_);
40 void mpu6050_request_async_temp_read(volatile int16_t *tempData, volatile uint8_t *status_);
41 void mpu6050_async_read_all(volatile int16_t *accData, volatile int16_t *tempData, volatile int16_t *gyroData, volatile uint64_t *timeData);
void mpu6050_async_read_all(volatile int16_t *accData, volatile int16_t *tempData, volatile int16_t *gyroData, volatile uint64_t *timeData)
Definition: drv_mpu6050.c:316
void mpu6050_read_gyro(int16_t *gyroData)
Definition: drv_mpu6050.c:250
void mpu6050_read_accel(int16_t *accData)
Definition: drv_mpu6050.c:236
void mpu6050_init(bool enableInterrupt, uint16_t *acc1G, float *gyroScale, int boardVersion)
Definition: drv_mpu6050.c:175
bool mpu6050_new_data()
Definition: drv_mpu6050.c:328
void mpu6050_request_async_temp_read(volatile int16_t *tempData, volatile uint8_t *status_)
void mpu6050_read_all(int16_t *accData, int16_t *gyroData, int16_t *tempData, uint64_t *time_us)
Definition: drv_mpu6050.c:216
void mpu6050_request_async_accel_read(int16_t *accData, volatile uint8_t *status_)
void mpu6050_read_temperature(int16_t *tempData)
Definition: drv_mpu6050.c:261
void mpu6050_register_interrupt_cb(void(*functionPtr)(void))
void mpu6050_request_async_gyro_read(int16_t *gyroData, volatile uint8_t *status_)


rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Thu Oct 24 2019 03:17:18