ardupilot/libraries/AP_HAL_Linux
Julien BERAUD f8f2833c88 AP_HAL_Linux: use I2C_SLAVE_FORCE in case of error
When there is already a driver registered on an i2c bus, the I2C_SLAVE ioctl
returns an error.
When it happens, it is better to display a warning and try to force the address.
It is especially useful on the bebop when killing the regular autopilot that uses
iio drivers to access the imu because else we would need to manually unbind the
driver in an init procedure.

I have added a warning because this error can also be resulting of another cause.
If the error is not EBUSY, then panic

If the I2C_SLAVE_FORCE ioctl fails then we panic because one of the i2c devices
won't be working properly.
2015-11-13 21:20:13 +11:00
..
examples Remove use of PROGMEM 2015-10-30 14:35:16 +09:00
AnalogIn_ADS1115.cpp AP_HAL_Linux: Add AnalogIn_ADS1115, common code 2015-11-04 13:58:24 +11:00
AnalogIn_ADS1115.h AP_HAL_Linux: Add AnalogIn_ADS1115, common code 2015-11-04 13:58:24 +11:00
AnalogIn.cpp AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
AnalogIn.h AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
AP_HAL_Linux_Namespace.h AP_HAL_Linux: RCOutput: Add LinuxRCOutput_Sysfs 2015-11-10 17:05:34 +11:00
AP_HAL_Linux_Private.h AP_HAL_Linux: RCOutput: Add LinuxRCOutput_Sysfs 2015-11-10 17:05:34 +11:00
AP_HAL_Linux.h AP_HAL: provide AP_HAL_MAIN() 2015-10-21 09:16:09 +11:00
ConsoleDevice.cpp AP_HAL_Linux: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
ConsoleDevice.h AP_HAL_Linux: standardize inclusion of libaries headers 2015-08-18 17:12:51 +10:00
dsm.cpp AP_HAL_Linux: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
dsm.h HAL_Linux: added low level DSM decoder 2014-10-08 12:50:50 +11:00
GPIO_BBB.cpp AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
GPIO_BBB.h AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
GPIO_Minnow.cpp AP_HAL_Linux: add GPIO definitions for minlure 2015-10-22 12:04:52 +11:00
GPIO_Minnow.h AP_HAL_Linux: add GPIO definitions for minlure 2015-10-22 12:04:52 +11:00
GPIO_RPI.cpp AP_HAL_Linux: GPIO, add Erle-Brain 2 2015-11-04 13:58:24 +11:00
GPIO_RPI.h AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
GPIO_Sysfs.cpp AP_HAL_Linux: add GPIO_Sysfs 2015-10-22 12:04:52 +11:00
GPIO_Sysfs.h AP_HAL_Linux: add GPIO_Sysfs 2015-10-22 12:04:52 +11:00
GPIO.cpp AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
GPIO.h AP_HAL_Linux: GPIO, add Erle-Brain 2 2015-11-04 13:58:24 +11:00
HAL_Linux_Class.cpp AP_HAL_Linux: move Util instantiation 2015-11-11 08:02:41 +11:00
HAL_Linux_Class.h AP_HAL_Linux: merge init() and run() 2015-10-21 09:16:08 +11:00
Heat_Pwm.cpp AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
Heat_Pwm.h AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
Heat.h AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
I2CDriver.cpp AP_HAL_Linux: use I2C_SLAVE_FORCE in case of error 2015-11-13 21:20:13 +11:00
I2CDriver.h AP_HAL_Linux: use I2C_SLAVE_FORCE in case of error 2015-11-13 21:20:13 +11:00
Perf.cpp AP_HAL_Linux: Implement perf API 2015-11-13 12:16:19 +11:00
PWM_Sysfs.cpp AP_HAL_Linux: rework PWM_Sysfs 2015-11-10 17:05:34 +11:00
PWM_Sysfs.h AP_HAL_Linux: rework PWM_Sysfs 2015-11-10 17:05:34 +11:00
px4io_protocol.h AP_HAL_Linux: new files for raspilot 2015-09-14 14:22:16 +10:00
RaspilotAnalogIn.cpp Remove use of PSTR 2015-10-30 14:35:04 +09:00
RaspilotAnalogIn.h AP_HAL_Linux: new files for raspilot 2015-09-14 14:22:16 +10:00
RCInput_AioPRU.cpp AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
RCInput_AioPRU.h AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
RCInput_PRU.cpp AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
RCInput_PRU.h AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
RCInput_Raspilot.cpp Remove use of PSTR 2015-10-30 14:35:04 +09:00
RCInput_Raspilot.h AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
RCInput_RPI.cpp AP_HAL_Linux: Add RCInput_RPI, merge common code 2015-11-04 13:58:24 +11:00
RCInput_RPI.h AP_HAL_Linux: Add RCInput_RPI, merge common code 2015-11-04 13:58:24 +11:00
RCInput_UART.cpp AP_HAL_Linux: use variadic panic() 2015-10-24 14:26:36 +11:00
RCInput_UART.h AP_HAL_Linux: add support for RCInput through UART 2015-10-22 12:04:52 +11:00
RCInput_UDP_Protocol.h AP_HAL_Linux: Add Support for RCInput_UDP 2015-09-07 12:10:08 +10:00
RCInput_UDP.cpp AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
RCInput_UDP.h AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
RCInput_ZYNQ.cpp AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
RCInput_ZYNQ.h AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
RCInput.cpp AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
RCInput.h AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
RCOutput_AioPRU.cpp AP_HAL_Linux: Improve loading firmware 2015-11-12 21:25:17 +01:00
RCOutput_AioPRU.h AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
RCOutput_Bebop.cpp Replace use of println_P() with println() 2015-10-30 14:35:22 +09:00
RCOutput_Bebop.h AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
RCOutput_PCA9685.cpp AP_HAL_Linux: don't log on failed semaphore 2015-11-03 11:08:00 +11:00
RCOutput_PCA9685.h AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
RCOutput_PRU.cpp AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
RCOutput_PRU.h AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
RCOutput_Raspilot.cpp Remove use of PSTR 2015-10-30 14:35:04 +09:00
RCOutput_Raspilot.h AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
RCOutput_Sysfs.cpp AP_HAL_Linux: RCOutput: Add LinuxRCOutput_Sysfs 2015-11-10 17:05:34 +11:00
RCOutput_Sysfs.h AP_HAL_Linux: RCOutput: Add LinuxRCOutput_Sysfs 2015-11-10 17:05:34 +11:00
RCOutput_ZYNQ.cpp AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
RCOutput_ZYNQ.h AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
RPIOUARTDriver.cpp Remove use of PSTR 2015-10-30 14:35:04 +09:00
RPIOUARTDriver.h AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
sbus.cpp HAL_Linux: fixed build warnings 2014-10-09 16:49:23 +11:00
sbus.h HAL_Linux: added SBUS decoder from PX4 project 2014-10-07 14:57:34 +11:00
Scheduler.cpp AP_HAL_Linux: Scheduler, add Erle-Brain 2 2015-11-04 13:58:24 +11:00
Scheduler.h Replace prog_char and prog_char_t with char 2015-10-30 14:35:30 +09:00
Semaphores.cpp AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
Semaphores.h AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
SerialDevice.h AP_HAL_Linux: added SerialDevice interface 2015-07-29 08:36:05 +10:00
SPIDriver.cpp AP_HAL_Linux: SPIDriver, add Erle-Brain 2 2015-11-04 13:58:24 +11:00
SPIDriver.h AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
SPIUARTDriver.cpp AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
SPIUARTDriver.h AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
Storage_FRAM.cpp Remove use of PSTR 2015-10-30 14:35:04 +09:00
Storage_FRAM.h AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
Storage.cpp AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
Storage.h AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
TCPServerDevice.cpp AP_HAL_Linux: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
TCPServerDevice.h AP_HAL_Linux: standardize inclusion of libaries headers 2015-08-18 17:12:51 +10:00
ToneAlarmDriver.cpp AP_HAL_Linux: added tonealarm support for raspilot 2015-09-14 14:22:16 +10:00
ToneAlarmDriver.h AP_HAL_Linux: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
UARTDevice.cpp AP_HAL_Linux: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
UARTDevice.h AP_HAL_Linux: standardize inclusion of libaries headers 2015-08-18 17:12:51 +10:00
UARTDriver.cpp AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
UARTDriver.h AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
UDPDevice.cpp AP_HAL_Linux: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
UDPDevice.h AP_HAL_Linux: standardize inclusion of libaries headers 2015-08-18 17:12:51 +10:00
Util_RPI.cpp AP_HAL_Linux: UtilRPI, add Erle-Brain 2 2015-11-04 13:58:24 +11:00
Util_RPI.h AP_HAL_Linux: remove prefix from AP_HAL_Linux classes 2015-10-21 10:11:19 +11:00
Util.cpp AP_HAL_Linux: Add PWM_Sysfs 2015-11-10 17:05:34 +11:00
Util.h AP_HAL_Linux: Implement perf API 2015-11-13 12:16:19 +11:00