mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 20:03:33 +08:00
Frame up the configuration for the serial interface on IOv2
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
SRCS = adc.c \
|
||||
controls.c \
|
||||
dsm.c \
|
||||
i2c.c \
|
||||
px4io.c \
|
||||
registers.c \
|
||||
safety.c \
|
||||
@@ -16,4 +15,12 @@ SRCS = adc.c \
|
||||
../systemlib/mixer/mixer_group.cpp \
|
||||
../systemlib/mixer/mixer_multirotor.cpp \
|
||||
../systemlib/mixer/mixer_simple.cpp \
|
||||
|
||||
|
||||
ifneq ($(CONFIG_ARCH_BOARD_PX4IO),)
|
||||
SRCS += i2c.c
|
||||
EXTRADEFINES += -DINTERFACE_I2C
|
||||
endif
|
||||
ifneq ($(CONFIG_ARCH_BOARD_PX4IOV2),)
|
||||
#SRCS += serial.c
|
||||
EXTRADEFINES += -DINTERFACE_SERIAL
|
||||
endif
|
||||
|
||||
@@ -64,11 +64,6 @@ struct sys_state_s system_state;
|
||||
|
||||
static struct hrt_call serial_dma_call;
|
||||
|
||||
#ifdef CONFIG_STM32_I2C1
|
||||
/* store i2c reset count XXX this should be a register, together with other error counters */
|
||||
volatile uint32_t i2c_loop_resets = 0;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* a set of debug buffers to allow us to send debug information from ISRs
|
||||
*/
|
||||
@@ -159,10 +154,13 @@ user_start(int argc, char *argv[])
|
||||
/* initialise the control inputs */
|
||||
controls_init();
|
||||
|
||||
#ifdef CONFIG_STM32_I2C1
|
||||
#ifdef INTERFACE_I2C
|
||||
/* start the i2c handler */
|
||||
i2c_init();
|
||||
#endif
|
||||
#ifdef INTERFACE_SERIAL
|
||||
/* start the serial interface */
|
||||
#endif
|
||||
|
||||
/* add a performance counter for mixing */
|
||||
perf_counter_t mixer_perf = perf_alloc(PC_ELAPSED, "mix");
|
||||
@@ -223,12 +221,11 @@ user_start(int argc, char *argv[])
|
||||
|
||||
struct mallinfo minfo = mallinfo();
|
||||
|
||||
isr_debug(1, "d:%u s=0x%x a=0x%x f=0x%x r=%u m=%u",
|
||||
isr_debug(1, "d:%u s=0x%x a=0x%x f=0x%x m=%u",
|
||||
(unsigned)r_page_setup[PX4IO_P_SETUP_SET_DEBUG],
|
||||
(unsigned)r_status_flags,
|
||||
(unsigned)r_setup_arming,
|
||||
(unsigned)r_setup_features,
|
||||
(unsigned)i2c_loop_resets,
|
||||
(unsigned)minfo.mxordblk);
|
||||
last_debug_time = hrt_absolute_time();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user