mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-19 10:34:28 +08:00
remove bench_sensors and replace with i2c and CAN versions conditionally compiled by conf
This commit is contained in:
@@ -99,7 +99,8 @@ main_stm32.srcs += downlink.c pprz_transport.c
|
||||
|
||||
|
||||
main_stm32.CFLAGS += -DUSE_OVERO_LINK
|
||||
main_stm32.CFLAGS += -DOVERO_LINK_MSG_UP=AutopilotMessageBethUp -DOVERO_LINK_MSG_DOWN=AutopilotMessageBethDown
|
||||
#main_stm32.CFLAGS += -DOVERO_LINK_MSG_UP=AutopilotMessageBethUp -DOVERO_LINK_MSG_DOWN=AutopilotMessageBethDown
|
||||
main_stm32.CFLAGS += -DOVERO_LINK_MSG_UP=AutopilotMessageFoo -DOVERO_LINK_MSG_DOWN=AutopilotMessageFoo
|
||||
main_stm32.CFLAGS += -DOVERO_LINK_LED_OK=5 -DOVERO_LINK_LED_KO=4 -DUSE_DMA1_C2_IRQ
|
||||
main_stm32.srcs += lisa/lisa_overo_link.c lisa/arch/stm32/lisa_overo_link_arch.c
|
||||
|
||||
@@ -115,18 +116,18 @@ main_stm32.srcs += math/pprz_trig_int.c
|
||||
main_stm32.srcs += $(SRC_BOOZ)/booz2_commands.c
|
||||
main_stm32.srcs += $(SRC_BOOZ)/actuators/booz_actuators_asctec.c
|
||||
#\
|
||||
# $(SRC_BOOZ_ARCH)/actuators/booz_actuators_asctec_arch.c
|
||||
main_stm32.CFLAGS += -DACTUATORS_ASCTEC_DEVICE=i2c1
|
||||
# -DBOOZ_START_DELAY=3
|
||||
# -DUSE_TIM2_IRQ
|
||||
# $(SRC_BOOZ_ARCH)/actuators/booz_actuators_asctec_arch.c
|
||||
main_stm32.CFLAGS += -DACTUATORS_ASCTEC_DEVICE=i2c1
|
||||
#-DBOOZ_START_DELAY=3 -DUSE_TIM2_IRQ
|
||||
main_stm32.CFLAGS += -DUSE_I2C1
|
||||
main_stm32.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
|
||||
|
||||
main_stm32.CFLAGS += -DUSE_I2C2
|
||||
main_stm32.srcs += $(SRC_BETH)/bench_sensors.c
|
||||
#main_stm32.CFLAGS += -DUSE_I2C2
|
||||
#main_stm32.srcs += $(SRC_BETH)/bench_sensors_i2c.c
|
||||
|
||||
main_stm32.CFLAGS += -DUSE_CAN1 -DUSE_USB_LP_CAN1_RX0_IRQ -DBETH_HACK
|
||||
main_stm32.CFLAGS += -DUSE_CAN1 -DUSE_USB_LP_CAN1_RX0_IRQ
|
||||
main_stm32.srcs += can.c $(SRC_ARCH)/can_hw.c
|
||||
main_stm32.srcs += $(SRC_BETH)/bench_sensors_can.c
|
||||
|
||||
#
|
||||
# Coders handled by a Olimex stm32h103 dev board
|
||||
@@ -178,7 +179,8 @@ main_overo.ARCHDIR = omap
|
||||
main_overo.CFLAGS = -I. -I$(SRC_FMS)
|
||||
main_overo.srcs = $(SRC_BETH)/main_overo.c
|
||||
main_overo.srcs += $(SRC_FMS)/fms_spi_link.c
|
||||
main_overo.CFLAGS += -DOVERO_LINK_MSG_UP=AutopilotMessageBethUp -DOVERO_LINK_MSG_DOWN=AutopilotMessageBethDown
|
||||
#main_overo.CFLAGS += -DOVERO_LINK_MSG_UP=AutopilotMessageBethUp -DOVERO_LINK_MSG_DOWN=AutopilotMessageBethDown
|
||||
main_overo.CFLAGS += -DOVERO_LINK_MSG_UP=AutopilotMessageFoo -DOVERO_LINK_MSG_DOWN=AutopilotMessageFoo
|
||||
|
||||
|
||||
#
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
#include "bench_sensors.h"
|
||||
|
||||
struct BenchSensors bench_sensors,bench_sensors2;
|
||||
|
||||
|
||||
void bench_sensors_init(void) {
|
||||
bench_sensors.status = BS_IDLE;
|
||||
bench_sensors.i2c_done = TRUE;
|
||||
}
|
||||
|
||||
void bench_sensors2_init(void) {
|
||||
bench_sensors2.status = BS_IDLE;
|
||||
bench_sensors2.i2c_done = TRUE;
|
||||
}
|
||||
|
||||
|
||||
void read_bench_sensors(void) {
|
||||
|
||||
const uint8_t bench_addr = 0x40;
|
||||
bench_sensors.status = BS_BUSY;
|
||||
bench_sensors.i2c_done = FALSE;
|
||||
i2c2_receive(bench_addr, 4, &bench_sensors.i2c_done);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void read_bench_sensors2(void) {
|
||||
|
||||
const uint8_t bench_addr2 = 0x30;
|
||||
bench_sensors2.status = BS_BUSY;
|
||||
bench_sensors2.i2c_done = FALSE;
|
||||
i2c2_receive(bench_addr2, 4, &bench_sensors2.i2c_done);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user