From 853600a2eff3fcf013ec7b9dc10302d0694f56a5 Mon Sep 17 00:00:00 2001 From: Stacey Sheldon Date: Tue, 17 Apr 2012 09:38:27 -0400 Subject: [PATCH] i2c: enable flexiport i2c on revolution --- flight/PiOS/Boards/STM32F4xx_Revolution.h | 3 +++ flight/Revolution/System/pios_board.c | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/flight/PiOS/Boards/STM32F4xx_Revolution.h b/flight/PiOS/Boards/STM32F4xx_Revolution.h index a69952ec6..1bec9e414 100644 --- a/flight/PiOS/Boards/STM32F4xx_Revolution.h +++ b/flight/PiOS/Boards/STM32F4xx_Revolution.h @@ -103,6 +103,9 @@ TIM8 | | | | #define PIOS_I2C_MAX_DEVS 3 extern uint32_t pios_i2c_mag_adapter_id; #define PIOS_I2C_MAIN_ADAPTER (pios_i2c_mag_adapter_id) +extern uint32_t pios_i2c_flexiport_adapter_id; +#define PIOS_I2C_FLEXI_ADAPTER (pios_i2c_flexiport_adapter_id) +#define PIOS_I2C_ETASV3_ADAPTER (PIOS_I2C_FLEXI_ADAPTER) //------------------------- // PIOS_USART diff --git a/flight/Revolution/System/pios_board.c b/flight/Revolution/System/pios_board.c index 0d57da254..b6c275166 100644 --- a/flight/Revolution/System/pios_board.c +++ b/flight/Revolution/System/pios_board.c @@ -669,15 +669,12 @@ void PIOS_Board_Init(void) { case HWSETTINGS_RV_FLEXIPORT_DISABLED: break; case HWSETTINGS_RV_FLEXIPORT_I2C: -//TODO: Enable I2C #if defined(PIOS_INCLUDE_I2C) -/* { - if (PIOS_I2C_Init(&pios_i2c_flexi_adapter_id, &pios_i2c_flexi_adapter_cfg)) { + if (PIOS_I2C_Init(&pios_i2c_flexiport_adapter_id, &pios_i2c_flexiport_adapter_cfg)) { PIOS_Assert(0); } } -*/ #endif /* PIOS_INCLUDE_I2C */ break;