From d4bfb0f0a317b6a298255e325dd96da242f54752 Mon Sep 17 00:00:00 2001
From: Alexandre Abadie <alexandre.abadie@inria.fr>
Date: Tue, 20 Jun 2017 11:03:56 +0200
Subject: [PATCH] sys/phydat: add counts unit

---
 sys/include/phydat.h    | 1 +
 sys/phydat/phydat_str.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/sys/include/phydat.h b/sys/include/phydat.h
index b94aecb8a4..946a933703 100644
--- a/sys/include/phydat.h
+++ b/sys/include/phydat.h
@@ -101,6 +101,7 @@ enum {
     UNIT_CD,        /**< Candela */
     /* logical */
     UNIT_BOOL,      /**< boolean value [0|1] */
+    UNIT_CTS,       /**< counts */
     UNIT_PERCENT,   /**< out of 100 */
     UNIT_PERMILL,   /**< out of 1000 */
     UNIT_PPM,       /**< part per million */
diff --git a/sys/phydat/phydat_str.c b/sys/phydat/phydat_str.c
index 7d5755c35d..a10fd7aee6 100644
--- a/sys/phydat/phydat_str.c
+++ b/sys/phydat/phydat_str.c
@@ -98,6 +98,7 @@ const char *phydat_unit_to_str(uint8_t unit)
         case UNIT_PPB:      return "ppb";
         case UNIT_CD:       return "cd";
         case UNIT_PERCENT:  return "%";
+        case UNIT_CTS:      return "cts";
         default:            return "";
     }
 }
-- 
GitLab