mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-01 03:41:36 +08:00
IO: Remove outdated check
This commit is contained in:
@@ -2973,10 +2973,7 @@ get_interface()
|
|||||||
#ifndef CONFIG_ARCH_BOARD_PX4FMU_V1
|
#ifndef CONFIG_ARCH_BOARD_PX4FMU_V1
|
||||||
|
|
||||||
#ifdef PX4IO_SERIAL_BASE
|
#ifdef PX4IO_SERIAL_BASE
|
||||||
/* try for a serial interface */
|
interface = PX4IO_serial_interface();
|
||||||
if (PX4IO_serial_interface != nullptr) {
|
|
||||||
interface = PX4IO_serial_interface();
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (interface != nullptr) {
|
if (interface != nullptr) {
|
||||||
@@ -2986,10 +2983,7 @@ get_interface()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PX4_I2C_OBDEV_PX4IO
|
#ifdef PX4_I2C_OBDEV_PX4IO
|
||||||
/* try for an I2C interface if we haven't got a serial one */
|
interface = PX4IO_i2c_interface();
|
||||||
if (PX4IO_i2c_interface != nullptr) {
|
|
||||||
interface = PX4IO_i2c_interface();
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (interface != nullptr) {
|
if (interface != nullptr) {
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
|
|
||||||
/* XXX trim includes */
|
/* XXX trim includes */
|
||||||
#include <px4_config.h>
|
#include <px4_config.h>
|
||||||
|
#include <px4_posix.h>
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@@ -177,8 +178,8 @@ PX4IO_serial::PX4IO_serial() :
|
|||||||
_tx_dma(nullptr),
|
_tx_dma(nullptr),
|
||||||
_rx_dma(nullptr),
|
_rx_dma(nullptr),
|
||||||
_rx_dma_status(_dma_status_inactive),
|
_rx_dma_status(_dma_status_inactive),
|
||||||
_bus_semaphore(px4_sem_initIALIZER(0)),
|
_bus_semaphore(SEM_INITIALIZER(0)),
|
||||||
_completion_semaphore(px4_sem_initIALIZER(0)),
|
_completion_semaphore(SEM_INITIALIZER(0)),
|
||||||
_pc_txns(perf_alloc(PC_ELAPSED, "io_txns ")),
|
_pc_txns(perf_alloc(PC_ELAPSED, "io_txns ")),
|
||||||
_pc_dmasetup(perf_alloc(PC_ELAPSED, "io_dmasetup ")),
|
_pc_dmasetup(perf_alloc(PC_ELAPSED, "io_dmasetup ")),
|
||||||
_pc_retries(perf_alloc(PC_COUNT, "io_retries ")),
|
_pc_retries(perf_alloc(PC_COUNT, "io_retries ")),
|
||||||
@@ -551,7 +552,7 @@ PX4IO_serial::_wait_complete()
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
ret = px4_sem_timedwait(&_completion_semaphore, &abstime);
|
ret = sem_timedwait(&_completion_semaphore, &abstime);
|
||||||
|
|
||||||
if (ret == OK) {
|
if (ret == OK) {
|
||||||
/* check for DMA errors */
|
/* check for DMA errors */
|
||||||
|
|||||||
Reference in New Issue
Block a user