NinjaFlight
|
#include <stdbool.h>
#include <stdint.h>
#include <platform.h>
#include "build_config.h"
#include "debug.h"
#include "common/maths.h"
#include "system.h"
#include "gpio.h"
#include "bus_spi.h"
#include "sensor.h"
#include "accgyro.h"
#include "accgyro_l3gd20.h"
Macros | |
#define | READ_CMD ((uint8_t)0x80) |
#define | MULTIPLEBYTE_CMD ((uint8_t)0x40) |
#define | DUMMY_BYTE ((uint8_t)0x00) |
#define | CTRL_REG1_ADDR 0x20 |
#define | CTRL_REG4_ADDR 0x23 |
#define | CTRL_REG5_ADDR 0x24 |
#define | OUT_TEMP_ADDR 0x26 |
#define | OUT_X_L_ADDR 0x28 |
#define | MODE_ACTIVE ((uint8_t)0x08) |
#define | OUTPUT_DATARATE_1 ((uint8_t)0x00) |
#define | OUTPUT_DATARATE_2 ((uint8_t)0x40) |
#define | OUTPUT_DATARATE_3 ((uint8_t)0x80) |
#define | OUTPUT_DATARATE_4 ((uint8_t)0xC0) |
#define | AXES_ENABLE ((uint8_t)0x07) |
#define | BANDWIDTH_1 ((uint8_t)0x00) |
#define | BANDWIDTH_2 ((uint8_t)0x10) |
#define | BANDWIDTH_3 ((uint8_t)0x20) |
#define | BANDWIDTH_4 ((uint8_t)0x30) |
#define | FULLSCALE_250 ((uint8_t)0x00) |
#define | FULLSCALE_500 ((uint8_t)0x10) |
#define | FULLSCALE_2000 ((uint8_t)0x20) |
#define | BLOCK_DATA_UPDATE_CONTINUOUS ((uint8_t)0x00) |
#define | BLE_MSB ((uint8_t)0x40) |
#define | BOOT ((uint8_t)0x80) |
#define | L3GD20_GYRO_SCALE_FACTOR 0.07f |
Functions | |
bool | l3gd20Detect (gyro_t *gyr) |
#define AXES_ENABLE ((uint8_t)0x07) |
#define BANDWIDTH_1 ((uint8_t)0x00) |
#define BANDWIDTH_2 ((uint8_t)0x10) |
#define BANDWIDTH_3 ((uint8_t)0x20) |
#define BANDWIDTH_4 ((uint8_t)0x30) |
#define BLE_MSB ((uint8_t)0x40) |
#define BLOCK_DATA_UPDATE_CONTINUOUS ((uint8_t)0x00) |
#define BOOT ((uint8_t)0x80) |
#define CTRL_REG1_ADDR 0x20 |
#define CTRL_REG4_ADDR 0x23 |
#define CTRL_REG5_ADDR 0x24 |
#define DUMMY_BYTE ((uint8_t)0x00) |
#define FULLSCALE_2000 ((uint8_t)0x20) |
#define FULLSCALE_250 ((uint8_t)0x00) |
#define FULLSCALE_500 ((uint8_t)0x10) |
#define L3GD20_GYRO_SCALE_FACTOR 0.07f |
#define MODE_ACTIVE ((uint8_t)0x08) |
#define MULTIPLEBYTE_CMD ((uint8_t)0x40) |
#define OUT_TEMP_ADDR 0x26 |
#define OUT_X_L_ADDR 0x28 |
#define OUTPUT_DATARATE_1 ((uint8_t)0x00) |
#define OUTPUT_DATARATE_2 ((uint8_t)0x40) |
#define OUTPUT_DATARATE_3 ((uint8_t)0x80) |
#define OUTPUT_DATARATE_4 ((uint8_t)0xC0) |
#define READ_CMD ((uint8_t)0x80) |
bool l3gd20Detect | ( | gyro_t * | gyr | ) |