PX4IO driver: Get rid of weak function

This commit is contained in:
Lorenz Meier
2015-09-13 23:31:20 +02:00
parent 334c001cda
commit bdf5180b18
4 changed files with 11 additions and 6 deletions
+5 -2
View File
@@ -99,8 +99,7 @@
#include "modules/dataman/dataman.h"
extern device::Device *PX4IO_i2c_interface() weak_function;
extern device::Device *PX4IO_serial_interface() weak_function;
#include "px4io_driver.h"
#define PX4IO_SET_DEBUG _IOC(0xff00, 0)
#define PX4IO_INAIR_RESTART_ENABLE _IOC(0xff00, 1)
@@ -2973,10 +2972,12 @@ get_interface()
#ifndef CONFIG_ARCH_BOARD_PX4FMU_V1
#ifdef PX4IO_SERIAL_BASE
/* try for a serial interface */
if (PX4IO_serial_interface != nullptr) {
interface = PX4IO_serial_interface();
}
#endif
if (interface != nullptr) {
goto got;
@@ -2984,10 +2985,12 @@ get_interface()
#endif
#ifdef PX4_I2C_OBDEV_PX4IO
/* try for an I2C interface if we haven't got a serial one */
if (PX4IO_i2c_interface != nullptr) {
interface = PX4IO_i2c_interface();
}
#endif
if (interface != nullptr) {
goto got;