NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
accgyro_spi_mpu6500.c File Reference
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <platform.h>
#include "common/axis.h"
#include "common/maths.h"
#include "system.h"
#include "exti.h"
#include "gpio.h"
#include "bus_spi.h"
#include "sensor.h"
#include "accgyro.h"
#include "accgyro_mpu.h"
#include "accgyro_mpu6500.h"
#include "accgyro_spi_mpu6500.h"
Include dependency graph for accgyro_spi_mpu6500.c:

Macros

#define DISABLE_MPU6500   GPIO_SetBits(MPU6500_CS_GPIO, MPU6500_CS_PIN)
 
#define ENABLE_MPU6500   GPIO_ResetBits(MPU6500_CS_GPIO, MPU6500_CS_PIN)
 

Functions

bool mpu6500WriteRegister (uint8_t reg, uint8_t data)
 
bool mpu6500ReadRegister (uint8_t reg, uint8_t length, uint8_t *data)
 
bool mpu6500SpiDetect (void)
 
bool mpu6500SpiAccDetect (acc_t *accel)
 
bool mpu6500SpiGyroDetect (gyro_t *gyr)
 

Macro Definition Documentation

#define DISABLE_MPU6500   GPIO_SetBits(MPU6500_CS_GPIO, MPU6500_CS_PIN)
#define ENABLE_MPU6500   GPIO_ResetBits(MPU6500_CS_GPIO, MPU6500_CS_PIN)

Function Documentation

bool mpu6500ReadRegister ( uint8_t  reg,
uint8_t  length,
uint8_t *  data 
)

Here is the call graph for this function:

bool mpu6500SpiAccDetect ( acc_t accel)

Here is the call graph for this function:

bool mpu6500SpiDetect ( void  )

Here is the call graph for this function:

bool mpu6500SpiGyroDetect ( gyro_t gyr)

Here is the call graph for this function:

bool mpu6500WriteRegister ( uint8_t  reg,
uint8_t  data 
)

Here is the call graph for this function: