MERGE - OLIMEXINO - Initial support for the OLIMEXINO board.

PWM and ADC configuration is the same as the naze32 for now.  Requires an accelerometer is connected via I2C2.
I2C signals SDA2 and SCL2 are on the UEXT header (Pins 6 and 5 respectively)
USART signals TX and RX are on the CON3/CON4 headers (TX = D7, RX = D8)
Onboard LEDs (LED1/LED2) working.
Buzzer support removed for now as it conflicted with PWM map and LEDs.
mma845x support disabled as it conflicted with an LED.
Relocated some NAZE specific comments.

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@302 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61

Conflicts:

	src/board.h
	src/main.c

Conflicts:

	src/main.c
This commit is contained in:
timecop@gmail.com 2013-04-07 13:18:37 +00:00 committed by Dominic Clifton
parent 4da8accfc0
commit 4bde0d0c9c
3 changed files with 8 additions and 12 deletions

View File

@ -130,10 +130,8 @@ typedef struct baro_t
#define SENSORS_SET (SENSOR_ACC) #define SENSORS_SET (SENSOR_ACC)
#endif #else
// Afroflight32
#ifdef NAZE
// Afroflight32
#define LED0_GPIO GPIOB #define LED0_GPIO GPIOB
#define LED0_PIN GPIO_Pin_3 // PB3 (LED) #define LED0_PIN GPIO_Pin_3 // PB3 (LED)
#define LED1_GPIO GPIOB #define LED1_GPIO GPIOB
@ -196,9 +194,7 @@ typedef struct baro_t
#include "drv_l3g4200d.h" #include "drv_l3g4200d.h"
#include "drv_pwm.h" #include "drv_pwm.h"
#include "drv_uart.h" #include "drv_uart.h"
#endif #else
#ifdef NAZE
// AfroFlight32 // AfroFlight32
#include "drv_system.h" // timers, delays, etc #include "drv_system.h" // timers, delays, etc
#include "drv_adc.h" #include "drv_adc.h"

View File

@ -57,7 +57,7 @@ int main(void)
adcInit(&adc_params); adcInit(&adc_params);
// We have these sensors // We have these sensors; SENSORS_SET defined in board.h depending on hardware platform
sensorsSet(SENSORS_SET); sensorsSet(SENSORS_SET);
mixerInit(); // this will set useServo var depending on mixer type mixerInit(); // this will set useServo var depending on mixer type

View File

@ -59,7 +59,7 @@ retry:
if (mcfg.acc_hardware == ACC_ADXL345) if (mcfg.acc_hardware == ACC_ADXL345)
break; break;
; // fallthrough ; // fallthrough
case 2: // MPU6050 case 2: // MPU6050
if (haveMpu6k) { if (haveMpu6k) {
mpu6050Detect(&acc, &gyro, mcfg.gyro_lpf, &mcfg.mpu6050_scale); // yes, i'm rerunning it again. re-fill acc struct mpu6050Detect(&acc, &gyro, mcfg.gyro_lpf, &mcfg.mpu6050_scale); // yes, i'm rerunning it again. re-fill acc struct
accHardware = ACC_MPU6050; accHardware = ACC_MPU6050;
@ -67,8 +67,8 @@ retry:
break; break;
} }
; // fallthrough ; // fallthrough
#ifndef OLIMEXINO
case 3: // MMA8452 case 3: // MMA8452
#ifndef OLIMEXINO
if (mma8452Detect(&acc)) { if (mma8452Detect(&acc)) {
accHardware = ACC_MMA8452; accHardware = ACC_MMA8452;
if (mcfg.acc_hardware == ACC_MMA8452) if (mcfg.acc_hardware == ACC_MMA8452)