mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 19:36:35 +08:00
drivrs/leds: Userled driver was using LCD debug output instead of LED debug output.
This commit is contained in:
committed by
Gregory Nutt
parent
f346bb0e88
commit
0885ad7b14
@@ -88,7 +88,7 @@ static const struct userled_lowerhalf_s g_userled_lower =
|
|||||||
|
|
||||||
static userled_set_t userled_supported(FAR const struct userled_lowerhalf_s *lower)
|
static userled_set_t userled_supported(FAR const struct userled_lowerhalf_s *lower)
|
||||||
{
|
{
|
||||||
iinfo("BOARD_NLEDS: %02x\n", BOARD_NLEDS);
|
ledinfo("BOARD_NLEDS: %02x\n", BOARD_NLEDS);
|
||||||
return (userled_set_t)((1 << BOARD_NLEDS) - 1);
|
return (userled_set_t)((1 << BOARD_NLEDS) - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ static int userled_open(FAR struct file *filep)
|
|||||||
ret = userled_takesem(&priv->lu_exclsem);
|
ret = userled_takesem(&priv->lu_exclsem);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
lcderr("ERROR: userled_takesem failed: %d\n", ret);
|
lederr("ERROR: userled_takesem failed: %d\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -185,7 +185,7 @@ static int userled_open(FAR struct file *filep)
|
|||||||
opriv = (FAR struct userled_open_s *)kmm_zalloc(sizeof(struct userled_open_s));
|
opriv = (FAR struct userled_open_s *)kmm_zalloc(sizeof(struct userled_open_s));
|
||||||
if (!opriv)
|
if (!opriv)
|
||||||
{
|
{
|
||||||
lcderr("ERROR: Failled to allocate open structure\n");
|
lederr("ERROR: Failled to allocate open structure\n");
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto errout_with_sem;
|
goto errout_with_sem;
|
||||||
}
|
}
|
||||||
@@ -253,7 +253,7 @@ static int userled_close(FAR struct file *filep)
|
|||||||
ret = userled_takesem(&priv->lu_exclsem);
|
ret = userled_takesem(&priv->lu_exclsem);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
lcderr("ERROR: userled_takesem failed: %d\n", ret);
|
lederr("ERROR: userled_takesem failed: %d\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -266,7 +266,7 @@ static int userled_close(FAR struct file *filep)
|
|||||||
DEBUGASSERT(curr);
|
DEBUGASSERT(curr);
|
||||||
if (!curr)
|
if (!curr)
|
||||||
{
|
{
|
||||||
lcderr("ERROR: Failed to find open entry\n");
|
lederr("ERROR: Failed to find open entry\n");
|
||||||
ret = -ENOENT;
|
ret = -ENOENT;
|
||||||
goto errout_with_exclsem;
|
goto errout_with_exclsem;
|
||||||
}
|
}
|
||||||
@@ -318,7 +318,7 @@ static ssize_t userled_write(FAR struct file *filep, FAR const char *buffer,
|
|||||||
|
|
||||||
if (len < sizeof(userled_set_t))
|
if (len < sizeof(userled_set_t))
|
||||||
{
|
{
|
||||||
lcderr("ERROR: buffer too small: %lu\n", (unsigned long)len);
|
lederr("ERROR: buffer too small: %lu\n", (unsigned long)len);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -335,7 +335,7 @@ static ssize_t userled_write(FAR struct file *filep, FAR const char *buffer,
|
|||||||
ret = userled_takesem(&priv->lu_exclsem);
|
ret = userled_takesem(&priv->lu_exclsem);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
lcderr("ERROR: userled_takesem failed: %d\n", ret);
|
lederr("ERROR: userled_takesem failed: %d\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -370,7 +370,7 @@ static int userled_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
|||||||
ret = userled_takesem(&priv->lu_exclsem);
|
ret = userled_takesem(&priv->lu_exclsem);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
lcderr("ERROR: userled_takesem failed: %d\n", ret);
|
lederr("ERROR: userled_takesem failed: %d\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -500,7 +500,7 @@ static int userled_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
lcderr("ERROR: Unrecognized command: %ld\n", cmd);
|
lederr("ERROR: Unrecognized command: %ld\n", cmd);
|
||||||
ret = -ENOTTY;
|
ret = -ENOTTY;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -548,7 +548,7 @@ int userled_register(FAR const char *devname,
|
|||||||
|
|
||||||
if (!priv)
|
if (!priv)
|
||||||
{
|
{
|
||||||
lcderr("ERROR: Failed to allocate device structure\n");
|
lederr("ERROR: Failed to allocate device structure\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -569,7 +569,7 @@ int userled_register(FAR const char *devname,
|
|||||||
ret = register_driver(devname, &userled_fops, 0666, priv);
|
ret = register_driver(devname, &userled_fops, 0666, priv);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
lcderr("ERROR: register_driver failed: %d\n", ret);
|
lederr("ERROR: register_driver failed: %d\n", ret);
|
||||||
goto errout_with_priv;
|
goto errout_with_priv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user