<airframe name="MOTOR_BENCH">

  <makefile>

ARCH=lpc21

FLASH_MODE = IAP

MB=motor_bench

main.ARCHDIR = $(ARCH)

main.CFLAGS += -DBOARD_CONFIG=\"conf_motor_bench.h\" -I$(MB)
main.srcs = $(MB)/main_motor_bench.c

main.CFLAGS += -DPERIODIC_FREQUENCY='250.' -DUSE_SYS_TIME
main.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c

main.CFLAGS += -DUSE_LED

main.srcs += $(SRC_ARCH)/armVIC.c

main.CFLAGS += -DUSE_UART0 -DUART0_BAUD=B115200
main.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c

main.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart0
main.srcs += subsystems/datalink/downlink.c subsystems/datalink/pprz_transport.c

main.CFLAGS += -DDATALINK=PPRZ -DPPRZ_UART=Uart0

main.srcs += $(MB)/mb_servo.c

main.CFLAGS += -DUSE_I2C0 -DI2C0_SCLL=150 -DI2C0_SCLH=150 -DI2C0_VIC_SLOT=3
main.CFLAGS += -DUSE_TWI_CONTROLLER
#main.CFLAGS += -DI2C_SCLL=100 -DI2C_SCLH=100
#main.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c $(MB)/mb_twi_controller.c
main.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c $(MB)/mb_twi_controller_asctech.c
#main.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c $(MB)/mb_twi_controller_mkk.c

main.CFLAGS += -DMB_TACHO
main.srcs += $(MB)/mb_tacho.c

main.CFLAGS += -DADC -DUSE_ADC_0 -DUSE_ADC_1
main.srcs += $(SRC_ARCH)/adc_hw.c
main.srcs += $(MB)/mb_current.c

main.CFLAGS += -DMB_SCALE
main.srcs += $(MB)/mb_scale.c

main.srcs += $(MB)/mb_modes.c
#main.srcs += $(MB)/mb_static.c
#main.srcs += $(MB)/mb_mode_fixed_rpm.c

foo.ARCHDIR = $(ARCH)

foo.CFLAGS += -DBOARD_CONFIG=\"conf_motor_bench.h\" -I$(MB)
foo.srcs = $(MB)/main_foo.c

foo.CFLAGS += -DPERIODIC_FREQUENCY='250.' -DUSE_SYS_TIME
foo.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c

foo.CFLAGS += -DUSE_LED
foo.srcs += $(SRC_ARCH)/armVIC.c

foo.CFLAGS += -DUSE_I2C0 -DI2C0_SCLL=150 -DI2C0_SCLH=150 -DI2C0_VIC_SLOT=9
foo.CFLAGS += -DUSE_TWI_CONTROLLER
foo.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c $(MB)/mb_twi_controller_asctech.c




bar.ARCHDIR = $(ARCH)

bar.CFLAGS += -DBOARD_CONFIG=\"conf_motor_bench.h\" -I$(MB)
bar.srcs = $(MB)/main_bar.c

bar.CFLAGS += -DPERIODIC_FREQUENCY='250.' -DUSE_SYS_TIME
bar.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c

bar.CFLAGS += -DUSE_LED
bar.srcs += $(SRC_ARCH)/armVIC.c

bar.CFLAGS += -DUSE_I2C0 -DI2C0_SCLL=150 -DI2C0_SCLH=150 -DI2C0_VIC_SLOT=9
bar.CFLAGS += -DUSE_TWI_CONTROLLER
bar.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c $(MB)/mb_twi_controller_mkk.c




  </makefile>

</airframe>
