mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-21 11:54:15 +01:00
F2 PiOS: Small fix to hmc5883 driver
This commit is contained in:
parent
ba413d5dad
commit
1dc08e5cf7
@ -552,7 +552,7 @@ uint32_t pios_com_gps_id;
|
|||||||
/**
|
/**
|
||||||
* Sensor configurations
|
* Sensor configurations
|
||||||
*/
|
*/
|
||||||
#if defined (PIOS_INCLUDE_HMC5883)
|
#if defined (PIOS_INCLUDE_HMC5883)
|
||||||
#include "pios_hmc5883.h"
|
#include "pios_hmc5883.h"
|
||||||
|
|
||||||
static const struct pios_hmc5883_cfg pios_hmc5883_mag_cfg = {
|
static const struct pios_hmc5883_cfg pios_hmc5883_mag_cfg = {
|
||||||
|
@ -63,7 +63,7 @@ void PIOS_HMC5883_Init(const struct pios_hmc5883_cfg * cfg)
|
|||||||
// RCC_APB2PeriphClockCmd(PIOS_HMC5883_DRDY_CLK | RCC_APB2Periph_AFIO, ENABLE);
|
// RCC_APB2PeriphClockCmd(PIOS_HMC5883_DRDY_CLK | RCC_APB2Periph_AFIO, ENABLE);
|
||||||
|
|
||||||
/* Configure EOC pin as input floating */
|
/* Configure EOC pin as input floating */
|
||||||
GPIO_Init(cfg->drdy, &cfg->drdy.init);
|
GPIO_Init(cfg->drdy.gpio, &cfg->drdy.init);
|
||||||
|
|
||||||
/* Configure the End Of Conversion (EOC) interrupt */
|
/* Configure the End Of Conversion (EOC) interrupt */
|
||||||
//GPIO_EXTILineConfig(cfg->eoc_exit.port_source, cfg->eoc_exit.pin_source);
|
//GPIO_EXTILineConfig(cfg->eoc_exit.port_source, cfg->eoc_exit.pin_source);
|
||||||
|
@ -35,6 +35,8 @@
|
|||||||
#ifndef PIOS_BMA180_H
|
#ifndef PIOS_BMA180_H
|
||||||
#define PIOS_BMA180_H
|
#define PIOS_BMA180_H
|
||||||
|
|
||||||
|
#include <pios.h>
|
||||||
|
|
||||||
/* BMA180 Addresses */
|
/* BMA180 Addresses */
|
||||||
#define BMA_CHIPID_ADDR 0x00
|
#define BMA_CHIPID_ADDR 0x00
|
||||||
#define BMA_VERSION_ADDR 0x00
|
#define BMA_VERSION_ADDR 0x00
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
#ifndef PIOS_HMC5883_H
|
#ifndef PIOS_HMC5883_H
|
||||||
#define PIOS_HMC5883_H
|
#define PIOS_HMC5883_H
|
||||||
|
|
||||||
#include <pios_stm32.h>
|
#include <pios.h>
|
||||||
|
|
||||||
/* HMC5883 Addresses */
|
/* HMC5883 Addresses */
|
||||||
#define PIOS_HMC5883_I2C_ADDR 0x1E
|
#define PIOS_HMC5883_I2C_ADDR 0x1E
|
||||||
|
Loading…
x
Reference in New Issue
Block a user