Skip to content
Snippets Groups Projects
Commit 2216fe76 authored by swym's avatar swym
Browse files

pmic.s: print string description of errno

parent 28e5deec
No related branches found
No related tags found
No related merge requests found
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include "timers.h" #include "timers.h"
#include <stdio.h> #include <stdio.h>
#include <string.h>
/* Task ID for the pmic handler */ /* Task ID for the pmic handler */
static TaskHandle_t pmic_task_id = NULL; static TaskHandle_t pmic_task_id = NULL;
...@@ -207,7 +208,10 @@ static void pmic_check_battery() ...@@ -207,7 +208,10 @@ static void pmic_check_battery()
res = pmic_read_amux(PMIC_AMUX_BATT_U, &u_batt); res = pmic_read_amux(PMIC_AMUX_BATT_U, &u_batt);
if (res < 0) { if (res < 0) {
LOG_ERR("pmic", "Failed reading battery voltage: %d", res); LOG_ERR("pmic",
"Failed reading battery voltage: %s (%d)",
strerror(-res),
res);
return; return;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment