mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-06 16:58:48 +08:00
adding a simple test for asctec motor controllers
This commit is contained in:
@@ -303,11 +303,11 @@ tunnel.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
|
||||
#tunnel.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B9600
|
||||
#tunnel.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B9600
|
||||
|
||||
tunnel.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B38400
|
||||
tunnel.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B38400
|
||||
#tunnel.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B38400
|
||||
#tunnel.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B38400
|
||||
|
||||
#tunnel.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
|
||||
#tunnel.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
|
||||
tunnel.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
|
||||
tunnel.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600
|
||||
|
||||
#tunnel.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B115200
|
||||
#tunnel.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B115200
|
||||
@@ -577,21 +577,21 @@ test_mc2.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
|
||||
#
|
||||
# test motor controllers asctec with interrupts
|
||||
#
|
||||
test_mc4.ARCHDIR = $(ARCHI)
|
||||
test_mc4.TARGET = test_mc
|
||||
test_mc4.TARGETDIR = test_mc
|
||||
test_mc4.CFLAGS = -I$(SRC_LISA) -I$(ARCHI) -DPERIPHERALS_AUTO_INIT
|
||||
test_mc4.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
|
||||
test_mc4.srcs = $(SRC_LISA)/test_mc4.c \
|
||||
$(SRC_ARCH)/stm32_exceptions.c \
|
||||
$(SRC_ARCH)/stm32_vector_table.c
|
||||
test_mc4.CFLAGS += -DUSE_LED
|
||||
test_mc4.srcs += $(SRC_ARCH)/led_hw.c
|
||||
test_mc4.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=1
|
||||
test_mc4.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
|
||||
test_mc4.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
|
||||
test_mc4.CFLAGS += -DUSE_I2C1
|
||||
test_mc4.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
|
||||
test_mc_asctec_v1_simple.ARCHDIR = $(ARCHI)
|
||||
test_mc_asctec_v1_simple.TARGET = test_mc_asctec_v1_simple
|
||||
test_mc_asctec_v1_simple.TARGETDIR = test_mc_asctec_v1_simple
|
||||
test_mc_asctec_v1_simple.CFLAGS = -I$(SRC_LISA) -I$(ARCHI) -DPERIPHERALS_AUTO_INIT
|
||||
test_mc_asctec_v1_simple.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG)
|
||||
test_mc_asctec_v1_simple.srcs = $(SRC_LISA)/test/test_mc_asctec_v1_simple.c \
|
||||
$(SRC_ARCH)/stm32_exceptions.c \
|
||||
$(SRC_ARCH)/stm32_vector_table.c
|
||||
test_mc_asctec_v1_simple.CFLAGS += -DUSE_LED
|
||||
test_mc_asctec_v1_simple.srcs += $(SRC_ARCH)/led_hw.c
|
||||
test_mc_asctec_v1_simple.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=1
|
||||
test_mc_asctec_v1_simple.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)'
|
||||
test_mc_asctec_v1_simple.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
|
||||
test_mc_asctec_v1_simple.CFLAGS += -DUSE_I2C1
|
||||
test_mc_asctec_v1_simple.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
|
||||
|
||||
|
||||
#
|
||||
|
||||
@@ -669,7 +669,7 @@ void i2c2_er_irq_handler(void) {
|
||||
/* disable IRQ, notifiy caller, update status */
|
||||
#define TransactionComplete() { \
|
||||
I2C_ITConfig(I2C2, I2C_IT_EVT|I2C_IT_BUF, DISABLE); \
|
||||
// DEBUG_S1_OFF(); \
|
||||
\
|
||||
if (i2c2.finished) *i2c2.finished = TRUE; \
|
||||
i2c2.status = I2CComplete; \
|
||||
I2c2StopHandler(); \
|
||||
|
||||
Reference in New Issue
Block a user