From 5146235a4b6a62085ccb981d3318755bb4d48769 Mon Sep 17 00:00:00 2001 From: Antoine Drouin Date: Thu, 2 Sep 2010 19:32:17 +0000 Subject: [PATCH] moved test_adxl345 to new test prog makefile --- conf/airframes/Poine/booz2_a7.xml | 1 + conf/autopilot/lisa_l_test_progs.makefile | 37 ++++++++++++++++++++--- sw/airborne/lisa/test/lisa_test_hmc5843.c | 1 - 3 files changed, 34 insertions(+), 5 deletions(-) diff --git a/conf/airframes/Poine/booz2_a7.xml b/conf/airframes/Poine/booz2_a7.xml index adf9b53139..c240696262 100644 --- a/conf/airframes/Poine/booz2_a7.xml +++ b/conf/airframes/Poine/booz2_a7.xml @@ -210,6 +210,7 @@ + diff --git a/conf/autopilot/lisa_l_test_progs.makefile b/conf/autopilot/lisa_l_test_progs.makefile index c93f295316..50a3a7f0ef 100644 --- a/conf/autopilot/lisa_l_test_progs.makefile +++ b/conf/autopilot/lisa_l_test_progs.makefile @@ -321,16 +321,45 @@ test_itg3200.srcs += lisa/test/lisa_test_itg3200.c \ test_itg3200.CFLAGS += -DUSE_LED test_itg3200.srcs += $(SRC_ARCH)/led_hw.c -test_itg3200.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=1 +test_itg3200.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=$(SYS_TIME_LED) test_itg3200.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))' test_itg3200.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c -test_itg3200.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600 +test_itg3200.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD) test_itg3200.srcs += $(SRC_ARCH)/uart_hw.c -test_itg3200.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2 +test_itg3200.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=$(MODEM_PORT) test_itg3200.srcs += downlink.c pprz_transport.c test_itg3200.CFLAGS += -DUSE_I2C2 test_itg3200.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c -test_itg3200.CFLAGS += -DUSE_EXTI15_10_IRQ # Gyro Int on PC14 \ No newline at end of file +test_itg3200.CFLAGS += -DUSE_EXTI15_10_IRQ # Gyro Int on PC14 + + +# +# test adxl345 with DMA +# +test_adxl345.ARCHDIR = $(ARCHI) +test_adxl345.TARGET = test_adxl345 +test_adxl345.TARGETDIR = test_adxl345 +test_adxl345.CFLAGS = -I$(SRC_LISA) -I$(ARCHI) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH) -DPERIPHERALS_AUTO_INIT +test_adxl345.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) +test_adxl345.srcs += lisa/test/lisa_test_adxl345_dma.c \ + $(SRC_ARCH)/stm32_exceptions.c \ + $(SRC_ARCH)/stm32_vector_table.c + +test_adxl345.CFLAGS += -DUSE_LED +test_adxl345.srcs += $(SRC_ARCH)/led_hw.c + +test_adxl345.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=1 +test_adxl345.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))' +test_adxl345.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c + +test_adxl345.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600 +test_adxl345.srcs += $(SRC_ARCH)/uart_hw.c + +test_adxl345.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=Uart2 +test_adxl345.srcs += downlink.c pprz_transport.c + +test_adxl345.CFLAGS += -DUSE_EXTI2_IRQ # Accel Int on PD2 +test_adxl345.CFLAGS += -DUSE_DMA1_C4_IRQ # SPI2 Rx DMA \ No newline at end of file diff --git a/sw/airborne/lisa/test/lisa_test_hmc5843.c b/sw/airborne/lisa/test/lisa_test_hmc5843.c index 4333cf475d..255cc74a89 100644 --- a/sw/airborne/lisa/test/lisa_test_hmc5843.c +++ b/sw/airborne/lisa/test/lisa_test_hmc5843.c @@ -43,7 +43,6 @@ static inline void main_event_task( void ); static inline void main_init_hw(void); -//static uint8_t i2c_done = FALSE; static struct i2c_transaction i2c_trans; #define INITIALIZED 6 static uint8_t mag_state = 0;