From ac98c98a0d2398571d6fc434751c32b68096e3f2 Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke <marian.buschsieweke@ovgu.de> Date: Tue, 31 Jul 2018 15:54:14 +0200 Subject: [PATCH] drivers/saul: Added coulomb counter & ammeter --- drivers/include/saul.h | 2 ++ drivers/saul/saul_str.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/include/saul.h b/drivers/include/saul.h index f6b0237d97..7acb21046a 100644 --- a/drivers/include/saul.h +++ b/drivers/include/saul.h @@ -99,6 +99,8 @@ enum { SAUL_SENSE_OCCUP = 0x91, /**< sensor: occupancy */ SAUL_SENSE_PROXIMITY= 0x92, /**< sensor: proximity */ SAUL_SENSE_RSSI = 0x93, /**< sensor: RSSI */ + SAUL_SENSE_CHARGE = 0x94, /**< sensor: coulomb counter */ + SAUL_SENSE_CURRENT = 0x95, /**< sensor: ammeter */ SAUL_CLASS_ANY = 0xff /**< any device - wildcard */ /* extend this list as needed... */ }; diff --git a/drivers/saul/saul_str.c b/drivers/saul/saul_str.c index 712a04a3ad..c8e1e85b46 100644 --- a/drivers/saul/saul_str.c +++ b/drivers/saul/saul_str.c @@ -55,6 +55,8 @@ const char *saul_class_to_str(const uint8_t class_id) case SAUL_SENSE_TVOC: return "SENSE_TVOC"; case SAUL_SENSE_PROXIMITY: return "SENSE_PROXIMITY"; case SAUL_SENSE_RSSI: return "SENSE_RSSI"; + case SAUL_SENSE_CHARGE: return "SENSE_CHARGE"; + case SAUL_SENSE_CURRENT: return "SENSE_CURRENT"; case SAUL_CLASS_ANY: return "CLASS_ANY"; case SAUL_SENSE_OCCUP: return "SENSE_OCCUP"; default: return "CLASS_UNKNOWN"; -- GitLab