<!-- dc motor controller -->
<airframe name="bl_mc">

  <makefile>

ARCH=avr

main.ARCHDIR=$(ARCH)
main.MCU = atmega128

# internal RC 8MHz
LOW_FUSE  = e4
HIGH_FUSE = 99
EXT_FUSE  = ff
LOCK_FUSE = ff

# 16MHz ceramic reso with longest startup
#LOW_FUSE  = cf
#HIGH_FUSE = 89
#EXT_FUSE  = ff
#LOCK_FUSE = ff

main.CFLAGS += -DBOARD_CONFIG=\"conf_bl_mc.h\"
main.srcs = main_bl_mc.c

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

main.CFLAGS += -DUSE_LED
#-DSYS_TIME_LED=1

main.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B38400
main.srcs += $(SRC_ARCH)/mcu_periph/uart_arch.c

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

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

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

main.CFLAGS += -D_32KHZ
main.srcs += $(SRC_ARCH)/bl_mc_pwm.c

</makefile>

</airframe>
