From 476bddd9a36cbbeee1ffe57de868d1e70663f3da Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 13 Jul 2018 19:47:38 +1000 Subject: [PATCH] HAL_ChibiOS: use HAL_I2C_INTERNAL_MASK --- libraries/AP_HAL_ChibiOS/I2CDevice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/I2CDevice.cpp b/libraries/AP_HAL_ChibiOS/I2CDevice.cpp index a21e9bc325..87e8f8aab4 100644 --- a/libraries/AP_HAL_ChibiOS/I2CDevice.cpp +++ b/libraries/AP_HAL_ChibiOS/I2CDevice.cpp @@ -340,7 +340,7 @@ uint32_t I2CDeviceManager::get_bus_mask(void) const uint32_t I2CDeviceManager::get_bus_mask_internal(void) const { // assume first bus is internal - return 1U; + return get_bus_mask() & HAL_I2C_INTERNAL_MASK; } /* @@ -349,7 +349,7 @@ uint32_t I2CDeviceManager::get_bus_mask_internal(void) const uint32_t I2CDeviceManager::get_bus_mask_external(void) const { // assume first bus is internal - return get_bus_mask() & 0xFE; + return get_bus_mask() & ~HAL_I2C_INTERNAL_MASK; } #endif // HAL_USE_I2C