mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
drivers/*: remove unneeded ENABLE_DEBUG
This commit is contained in:
parent
7eb3414cff
commit
6fc3ac8371
@ -28,18 +28,10 @@
|
||||
#define ENABLE_DEBUG 0
|
||||
#include "debug.h"
|
||||
|
||||
#if ENABLE_DEBUG
|
||||
|
||||
#define DEBUG_DEV(f, d, ...) \
|
||||
DEBUG("[itg320x] %s i2c dev=%d addr=%02x: " f "\n", \
|
||||
__func__, d->params.dev, d->params.addr, ## __VA_ARGS__);
|
||||
|
||||
#else /* ENABLE_DEBUG */
|
||||
|
||||
#define DEBUG_DEV(f, d, ...)
|
||||
|
||||
#endif /* ENABLE_DEBUG */
|
||||
|
||||
#define ERROR_DEV(f, d, ...) \
|
||||
do { \
|
||||
LOG_ERROR("[itg320x] %s i2c dev=%d addr=%02x: " f "\n", \
|
||||
@ -322,14 +314,14 @@ static int _reg_read(const itg320x_t *dev, uint8_t reg, uint8_t *data, uint16_t
|
||||
return ITG320X_ERROR_I2C;
|
||||
}
|
||||
|
||||
#if ENABLE_DEBUG
|
||||
printf("[itg320x] %s i2c dev=%d addr=%02x: read %d bytes from reg 0x%02x: ",
|
||||
__func__, dev->params.dev, dev->params.addr, len, reg);
|
||||
for (int i = 0; i < len; i++) {
|
||||
printf("%02x ", data[i]);
|
||||
if (IS_ACTIVE(ENABLE_DEBUG)) {
|
||||
printf("[itg320x] %s i2c dev=%d addr=%02x: read %d bytes from reg 0x%02x: ",
|
||||
__func__, dev->params.dev, dev->params.addr, len, reg);
|
||||
for (unsigned i = 0; i < len; i++) {
|
||||
printf("%02x ", data[i]);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
printf("\n");
|
||||
#endif
|
||||
|
||||
return ITG320X_OK;
|
||||
}
|
||||
|
@ -29,8 +29,6 @@
|
||||
#define ENABLE_DEBUG 0
|
||||
#include "debug.h"
|
||||
|
||||
#if ENABLE_DEBUG
|
||||
|
||||
#define ASSERT_PARAM(cond) \
|
||||
do { \
|
||||
if (!(cond)) { \
|
||||
@ -44,12 +42,6 @@
|
||||
DEBUG("[pca9685] %s i2c dev=%d addr=%02x: " f "\n", \
|
||||
__func__, d->params.i2c_dev, dev->params.i2c_addr, ## __VA_ARGS__)
|
||||
|
||||
#else /* ENABLE_DEBUG */
|
||||
|
||||
#define ASSERT_PARAM(cond) assert(cond)
|
||||
#define DEBUG_DEV(f, d, ...)
|
||||
|
||||
#endif /* ENABLE_DEBUG */
|
||||
#define ERROR_DEV(f, d, ...) \
|
||||
LOG_ERROR("[pca9685] %s i2c dev=%d addr=%02x: " f "\n", \
|
||||
__func__, d->params.i2c_dev, dev->params.i2c_addr, ## __VA_ARGS__)
|
||||
|
@ -63,12 +63,10 @@ uint16_t tps6274x_switch_voltage(tps6274x_t *dev, uint16_t voltage)
|
||||
/* mark pins that could and had to be set */
|
||||
vsel_set |= vsel & (1 << i);
|
||||
}
|
||||
#if ENABLE_DEBUG
|
||||
else {
|
||||
printf("[tps6274x] Pin vsel%u is not connected but is required for \
|
||||
selected voltage level\n", i + 1);
|
||||
DEBUG("[tps6274x] Pin vsel%u is not connected but is required for "
|
||||
"selected voltage level\n", i + 1);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return ((uint16_t)vsel_set) * 100 + 1800;
|
||||
}
|
||||
@ -78,9 +76,8 @@ void tps6274x_load_ctrl(tps6274x_t *dev, int status)
|
||||
if (gpio_is_valid(dev->params.ctrl_pin)) {
|
||||
gpio_write(dev->params.ctrl_pin, status);
|
||||
}
|
||||
#if ENABLE_DEBUG
|
||||
else {
|
||||
printf("[TPS6274x] CTRL Pin not defined, no load activation possible\n");
|
||||
DEBUG("[tps6274x] CTRL Pin not defined, no load activation "
|
||||
"possible\n");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user