Skip to content

Commit

Permalink
make selection of i2c driver selectable via airframe file
Browse files Browse the repository at this point in the history
Default is the old driver
add <configure name="USE_NEW_I2C_DRIVER" value="1"/> to the ap target to use the new driver
  • Loading branch information
flixr committed Mar 15, 2012
1 parent c888d1b commit 51ee1be
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion conf/autopilot/subsystems/shared/i2c_select.makefile
Expand Up @@ -4,9 +4,12 @@

$(TARGET).srcs += mcu_periph/i2c.c
ifeq ($(ARCH), stm32)
#$(TARGET).srcs += $(SRC_ARCH)/mcu_periph/i2c_arch.c
ifeq ($(USE_NEW_I2C_DRIVER), 1)
$(TARGET).srcs += $(SRC_ARCH)/mcu_periph/i2c_arch.rewritten.c
else
$(TARGET).srcs += $(SRC_ARCH)/mcu_periph/i2c_arch.c
endif
else
$(TARGET).srcs += $(SRC_ARCH)/mcu_periph/i2c_arch.c
endif

0 comments on commit 51ee1be

Please sign in to comment.