SPI+I2C: remove unused defines and printf's

This commit is contained in:
Beat Küng
2020-03-24 09:46:20 -04:00
committed by Daniel Agar
parent 2f3174abb0
commit 6ad5357d1a
9 changed files with 13 additions and 78 deletions
-17
View File
@@ -42,20 +42,3 @@
#include <board_config.h>
static const int i2c_bus_options[] = {
#ifdef PX4_I2C_BUS_EXPANSION
PX4_I2C_BUS_EXPANSION,
#endif
#ifdef PX4_I2C_BUS_EXPANSION1
PX4_I2C_BUS_EXPANSION1,
#endif
#ifdef PX4_I2C_BUS_EXPANSION2
PX4_I2C_BUS_EXPANSION2,
#endif
#ifdef PX4_I2C_BUS_ONBOARD
PX4_I2C_BUS_ONBOARD,
#endif
};
#define NUM_I2C_BUS_OPTIONS (sizeof(i2c_bus_options)/sizeof(i2c_bus_options[0]))
+2 -2
View File
@@ -155,8 +155,8 @@ I2C::init()
}
// tell the world where we are
DEVICE_LOG("on I2C bus %d at 0x%02x (bus: %u KHz, max: %u KHz)",
get_device_bus(), get_device_address(), _bus_clocks[bus_index] / 1000, _frequency / 1000);
DEVICE_DEBUG("on I2C bus %d at 0x%02x (bus: %u KHz, max: %u KHz)",
get_device_bus(), get_device_address(), _bus_clocks[bus_index] / 1000, _frequency / 1000);
out:
+2 -2
View File
@@ -121,8 +121,8 @@ SPI::init()
return ret;
}
/* tell the workd where we are */
DEVICE_LOG("on SPI bus %d at %d (%u KHz)", get_device_bus(), PX4_SPI_DEV_ID(_device), _frequency / 1000);
/* tell the world where we are */
DEVICE_DEBUG("on SPI bus %d at %d (%u KHz)", get_device_bus(), PX4_SPI_DEV_ID(_device), _frequency / 1000);
return PX4_OK;
}
+1 -1
View File
@@ -103,7 +103,7 @@ I2C::init()
}
// tell the world where we are
DEVICE_LOG("on I2C bus %d at 0x%02x", get_device_bus(), get_device_address());
DEVICE_DEBUG("on I2C bus %d at 0x%02x", get_device_bus(), get_device_address());
out:
+2 -2
View File
@@ -107,8 +107,8 @@ SPI::init()
return ret;
}
/* tell the workd where we are */
DEVICE_LOG("on SPI bus %d at %d (%u KHz)", get_device_bus(), PX4_SPI_DEV_ID(_device), _frequency / 1000);
/* tell the world where we are */
DEVICE_DEBUG("on SPI bus %d at %d (%u KHz)", get_device_bus(), PX4_SPI_DEV_ID(_device), _frequency / 1000);
return PX4_OK;
}
+1 -1
View File
@@ -101,7 +101,7 @@ I2C::init()
}
// tell the world where we are
DEVICE_LOG("on I2C bus %d at 0x%02x", get_device_bus(), get_device_address());
DEVICE_DEBUG("on I2C bus %d at 0x%02x", get_device_bus(), get_device_address());
out:
+2 -2
View File
@@ -105,8 +105,8 @@ SPI::init()
return ret;
}
/* tell the workd where we are */
DEVICE_LOG("on SPI bus %d at %d (%u KHz)", get_device_bus(), PX4_SPI_DEV_ID(_device), _frequency / 1000);
/* tell the world where we are */
DEVICE_DEBUG("on SPI bus %d at %d (%u KHz)", get_device_bus(), PX4_SPI_DEV_ID(_device), _frequency / 1000);
return PX4_OK;
}