1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-18 13:55:18 +03:00

AlienFligth F3 V2 support

Updated SPI driver (SPI3 on F3 targets)
AK8963 Mag support (part of MPU9250)
MPU9250 SPI support via MPU6500 driver
Updated LED driver for alternative LED sets
Enable gyro intterupt for AlienFlight F3 targets
Update AlienWii/AlienFlight documentation
Rename AlienWii to AlienFlight
This commit is contained in:
Michael Jakob 2016-01-27 09:40:58 +01:00 committed by borisbstyle
parent b1476c05f8
commit 7634e4c635
36 changed files with 771 additions and 247 deletions

View file

@ -55,6 +55,7 @@
#include "drivers/compass.h"
#include "drivers/compass_hmc5883l.h"
#include "drivers/compass_ak8975.h"
#include "drivers/compass_ak8963.h"
#include "drivers/sonar_hcsr04.h"
@ -68,7 +69,7 @@
#include "sensors/sonar.h"
#include "sensors/initialisation.h"
#ifdef NAZE
#ifdef USE_HARDWARE_REVISION_DETECTION
#include "hardware_revision.h"
#endif
@ -168,6 +169,34 @@ const extiConfig_t *selectMPUIntExtiConfig(void)
return &MotolabF3MPU6050Config;
#endif
#ifdef ALIENFLIGHTF3
// MPU_INT output on V1 PA15
static const extiConfig_t alienWiiF3V1MPUIntExtiConfig = {
.gpioAHBPeripherals = RCC_AHBPeriph_GPIOA,
.gpioPort = GPIOA,
.gpioPin = Pin_15,
.exti_port_source = EXTI_PortSourceGPIOA,
.exti_pin_source = EXTI_PinSource15,
.exti_line = EXTI_Line15,
.exti_irqn = EXTI15_10_IRQn
};
// MPU_INT output on V2 PB13
static const extiConfig_t alienWiiF3V2MPUIntExtiConfig = {
.gpioAHBPeripherals = RCC_AHBPeriph_GPIOB,
.gpioPort = GPIOB,
.gpioPin = Pin_13,
.exti_port_source = EXTI_PortSourceGPIOB,
.exti_pin_source = EXTI_PinSource13,
.exti_line = EXTI_Line13,
.exti_irqn = EXTI15_10_IRQn
};
if (hardwareRevision == AFF3_REV_1) {
return &alienWiiF3V1MPUIntExtiConfig;
} else {
return &alienWiiF3V2MPUIntExtiConfig;
}
#endif
return NULL;
}
@ -616,6 +645,18 @@ retry:
#endif
; // fallthrough
case MAG_AK8963:
#ifdef USE_MAG_AK8963
if (ak8963Detect(&mag)) {
#ifdef MAG_AK8963_ALIGN
magAlign = MAG_AK8963_ALIGN;
#endif
magHardware = MAG_AK8963;
break;
}
#endif
; // fallthrough
case MAG_NONE:
magHardware = MAG_NONE;
break;