You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by je...@apache.org on 2021/05/20 05:24:14 UTC
[incubator-nuttx] 17/21: arch: cxd56xx: gauge: Use the dedicated
debug macro
This is an automated email from the ASF dual-hosted git repository.
jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit efd4789b72c985235f964df06a90886ac51f13f5
Author: SPRESENSE <41...@users.noreply.github.com>
AuthorDate: Wed May 19 17:04:37 2021 +0900
arch: cxd56xx: gauge: Use the dedicated debug macro
Replace to the battery dedicated debug macro instead of standard one.
---
arch/arm/src/cxd56xx/cxd56_gauge.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/arm/src/cxd56xx/cxd56_gauge.c b/arch/arm/src/cxd56xx/cxd56_gauge.c
index 1decda4..769838a 100644
--- a/arch/arm/src/cxd56xx/cxd56_gauge.c
+++ b/arch/arm/src/cxd56xx/cxd56_gauge.c
@@ -52,11 +52,11 @@
/* Debug ********************************************************************/
#ifdef CONFIG_CXD56_GAUGE_DEBUG
-#define baterr(fmt, ...) logerr(fmt, ## __VA_ARGS__)
-#define batdbg(fmt, ...) logdebug(fmt, ## __VA_ARGS__)
+#define baterr(fmt, ...) _err(fmt, ## __VA_ARGS__)
+#define batinfo(fmt, ...) _info(fmt, ## __VA_ARGS__)
#else
#define baterr(fmt, ...)
-#define batdbg(fmt, ...)
+#define batinfo(fmt, ...)
#endif
/****************************************************************************
@@ -152,7 +152,7 @@ static int gauge_get_status(FAR enum battery_gauge_status_e *status)
break;
default:
- _info("Charge state %d\n", state);
+ batinfo("Charge state %d\n", state);
*status = BATTERY_IDLE;
break;
}
@@ -394,7 +394,7 @@ int cxd56_gauge_initialize(FAR const char *devpath)
ret = register_driver(devpath, &g_gaugeops, 0666, priv);
if (ret < 0)
{
- _err("ERROR: register_driver failed: %d\n", ret);
+ baterr("ERROR: register_driver failed: %d\n", ret);
return -EFAULT;
}