mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 06:42:32 +08:00
Add CONFIG_DEBUG_ERROR. Change names of *dbg() * *err()
This commit is contained in:
+12
-12
@@ -456,7 +456,7 @@ static int tsc2007_activate(FAR struct tsc2007_dev_s *priv, uint8_t cmd)
|
||||
ret = I2C_TRANSFER(priv->i2c, &msg, 1);
|
||||
if (ret < 0)
|
||||
{
|
||||
idbg("I2C_TRANSFER failed: %d\n", ret);
|
||||
ierr("I2C_TRANSFER failed: %d\n", ret);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -495,7 +495,7 @@ static int tsc2007_transfer(FAR struct tsc2007_dev_s *priv, uint8_t cmd)
|
||||
ret = I2C_TRANSFER(priv->i2c, &msg, 1);
|
||||
if (ret < 0)
|
||||
{
|
||||
idbg("I2C_TRANSFER failed: %d\n", ret);
|
||||
ierr("I2C_TRANSFER failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -540,7 +540,7 @@ static int tsc2007_transfer(FAR struct tsc2007_dev_s *priv, uint8_t cmd)
|
||||
ret = I2C_TRANSFER(priv->i2c, &msg, 1);
|
||||
if (ret < 0)
|
||||
{
|
||||
idbg("I2C_TRANSFER failed: %d\n", ret);
|
||||
ierr("I2C_TRANSFER failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -672,7 +672,7 @@ static void tsc2007_worker(FAR void *arg)
|
||||
|
||||
if (z1 == 0)
|
||||
{
|
||||
idbg("Z1 zero\n");
|
||||
ierr("Z1 zero\n");
|
||||
pressure = 0;
|
||||
}
|
||||
else
|
||||
@@ -687,7 +687,7 @@ static void tsc2007_worker(FAR void *arg)
|
||||
|
||||
if (pressure > 0x0fff)
|
||||
{
|
||||
idbg("Dropped out-of-range pressure: %d\n", pressure);
|
||||
ierr("Dropped out-of-range pressure: %d\n", pressure);
|
||||
pressure = 0;
|
||||
}
|
||||
}
|
||||
@@ -1131,7 +1131,7 @@ static int tsc2007_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
|
||||
if ((fds->events & POLLIN) == 0)
|
||||
{
|
||||
idbg("Missing POLLIN: revents: %08x\n", fds->revents);
|
||||
ierr("Missing POLLIN: revents: %08x\n", fds->revents);
|
||||
ret = -EDEADLK;
|
||||
goto errout;
|
||||
}
|
||||
@@ -1156,7 +1156,7 @@ static int tsc2007_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
|
||||
if (i >= CONFIG_TSC2007_NPOLLWAITERS)
|
||||
{
|
||||
idbg("No availabled slot found: %d\n", i);
|
||||
ierr("No availabled slot found: %d\n", i);
|
||||
fds->priv = NULL;
|
||||
ret = -EBUSY;
|
||||
goto errout;
|
||||
@@ -1242,7 +1242,7 @@ int tsc2007_register(FAR struct i2c_master_s *dev,
|
||||
priv = (FAR struct tsc2007_dev_s *)kmm_malloc(sizeof(struct tsc2007_dev_s));
|
||||
if (!priv)
|
||||
{
|
||||
idbg("kmm_malloc(%d) failed\n", sizeof(struct tsc2007_dev_s));
|
||||
ierr("kmm_malloc(%d) failed\n", sizeof(struct tsc2007_dev_s));
|
||||
return -ENOMEM;
|
||||
}
|
||||
#endif
|
||||
@@ -1265,7 +1265,7 @@ int tsc2007_register(FAR struct i2c_master_s *dev,
|
||||
ret = config->attach(config, tsc2007_interrupt);
|
||||
if (ret < 0)
|
||||
{
|
||||
idbg("Failed to attach interrupt\n");
|
||||
ierr("Failed to attach interrupt\n");
|
||||
goto errout_with_priv;
|
||||
}
|
||||
|
||||
@@ -1276,7 +1276,7 @@ int tsc2007_register(FAR struct i2c_master_s *dev,
|
||||
ret = tsc2007_transfer(priv, TSC2007_ENABLE_PENIRQ);
|
||||
if (ret < 0)
|
||||
{
|
||||
idbg("tsc2007_transfer failed: %d\n", ret);
|
||||
ierr("tsc2007_transfer failed: %d\n", ret);
|
||||
goto errout_with_priv;
|
||||
}
|
||||
|
||||
@@ -1288,7 +1288,7 @@ int tsc2007_register(FAR struct i2c_master_s *dev,
|
||||
ret = register_driver(devname, &tsc2007_fops, 0666, priv);
|
||||
if (ret < 0)
|
||||
{
|
||||
idbg("register_driver() failed: %d\n", ret);
|
||||
ierr("register_driver() failed: %d\n", ret);
|
||||
goto errout_with_priv;
|
||||
}
|
||||
|
||||
@@ -1311,7 +1311,7 @@ int tsc2007_register(FAR struct i2c_master_s *dev,
|
||||
ret = work_queue(HPWORK, &priv->work, tsc2007_worker, priv, 0);
|
||||
if (ret != 0)
|
||||
{
|
||||
idbg("Failed to queue work: %d\n", ret);
|
||||
ierr("Failed to queue work: %d\n", ret);
|
||||
goto errout_with_priv;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user