From a0089f072a03d878403efdfe2f263e0379a1a0c7 Mon Sep 17 00:00:00 2001 From: Stacey Sheldon Date: Sat, 12 Nov 2011 21:50:53 -0500 Subject: [PATCH] i2c: rename main adapter to flexi adapter on CC --- flight/CopterControl/System/pios_board.c | 20 ++++++++++---------- flight/PiOS/Boards/STM32103CB_CC_Rev1.h | 6 +++--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/flight/CopterControl/System/pios_board.c b/flight/CopterControl/System/pios_board.c index ffdde4759..4e0495776 100644 --- a/flight/CopterControl/System/pios_board.c +++ b/flight/CopterControl/System/pios_board.c @@ -903,12 +903,12 @@ const struct pios_pwm_cfg pios_pwm_cfg = { * I2C Adapters */ -void PIOS_I2C_main_adapter_ev_irq_handler(void); -void PIOS_I2C_main_adapter_er_irq_handler(void); -void I2C2_EV_IRQHandler() __attribute__ ((alias ("PIOS_I2C_main_adapter_ev_irq_handler"))); -void I2C2_ER_IRQHandler() __attribute__ ((alias ("PIOS_I2C_main_adapter_er_irq_handler"))); +void PIOS_I2C_flexi_adapter_ev_irq_handler(void); +void PIOS_I2C_flexi_adapter_er_irq_handler(void); +void I2C2_EV_IRQHandler() __attribute__ ((alias ("PIOS_I2C_flexi_adapter_ev_irq_handler"))); +void I2C2_ER_IRQHandler() __attribute__ ((alias ("PIOS_I2C_flexi_adapter_er_irq_handler"))); -static const struct pios_i2c_adapter_cfg pios_i2c_main_adapter_cfg = { +static const struct pios_i2c_adapter_cfg pios_i2c_flexi_adapter_cfg = { .regs = I2C2, .init = { .I2C_Mode = I2C_Mode_I2C, @@ -955,17 +955,17 @@ static const struct pios_i2c_adapter_cfg pios_i2c_main_adapter_cfg = { }, }; -uint32_t pios_i2c_main_adapter_id; -void PIOS_I2C_main_adapter_ev_irq_handler(void) +uint32_t pios_i2c_flexi_adapter_id; +void PIOS_I2C_flexi_adapter_ev_irq_handler(void) { /* Call into the generic code to handle the IRQ for this specific device */ - PIOS_I2C_EV_IRQ_Handler(pios_i2c_main_adapter_id); + PIOS_I2C_EV_IRQ_Handler(pios_i2c_flexi_adapter_id); } -void PIOS_I2C_main_adapter_er_irq_handler(void) +void PIOS_I2C_flexi_adapter_er_irq_handler(void) { /* Call into the generic code to handle the IRQ for this specific device */ - PIOS_I2C_ER_IRQ_Handler(pios_i2c_main_adapter_id); + PIOS_I2C_ER_IRQ_Handler(pios_i2c_flexi_adapter_id); } #endif /* PIOS_INCLUDE_I2C */ diff --git a/flight/PiOS/Boards/STM32103CB_CC_Rev1.h b/flight/PiOS/Boards/STM32103CB_CC_Rev1.h index ff37debdc..e908345b7 100644 --- a/flight/PiOS/Boards/STM32103CB_CC_Rev1.h +++ b/flight/PiOS/Boards/STM32103CB_CC_Rev1.h @@ -110,9 +110,9 @@ TIM4 | RC In 1 | Servo 3 | Servo 2 | Servo 1 // See also pios_board.c //------------------------ #define PIOS_I2C_MAX_DEVS 1 -extern uint32_t pios_i2c_main_adapter_id; -#define PIOS_I2C_MAIN_ADAPTER (pios_i2c_main_adapter_id) -#define PIOS_I2C_ESC_ADAPTER (pios_i2c_main_adapter_id) +extern uint32_t pios_i2c_flexi_adapter_id; +#define PIOS_I2C_MAIN_ADAPTER (pios_i2c_flexi_adapter_id) +#define PIOS_I2C_ESC_ADAPTER (pios_i2c_flexi_adapter_id) //------------------------- // SPI