drivers/saul: Add capacitance and voltage types

This commit is contained in:
Leandro Lanzieri 2019-02-15 13:32:35 +01:00
parent aefdc6550c
commit 85e75cf9f8
2 changed files with 67 additions and 63 deletions

View File

@ -102,6 +102,8 @@ enum {
SAUL_SENSE_CHARGE = 0x94, /**< sensor: coulomb counter */
SAUL_SENSE_CURRENT = 0x95, /**< sensor: ammeter */
SAUL_SENSE_PM = 0x96, /**< sensor: particulate matter */
SAUL_SENSE_CAPACITANCE = 0x97, /**< sensor: capacitance */
SAUL_SENSE_VOLTAGE = 0x98, /**< sensor: voltage */
SAUL_CLASS_ANY = 0xff /**< any device - wildcard */
/* extend this list as needed... */
};

View File

@ -59,6 +59,8 @@ const char *saul_class_to_str(const uint8_t class_id)
case SAUL_SENSE_CURRENT: return "SENSE_CURRENT";
case SAUL_SENSE_OCCUP: return "SENSE_OCCUP";
case SAUL_SENSE_PM: return "SENSE_PM";
case SAUL_SENSE_CAPACITANCE: return "SENSE_CAPACITANCE";
case SAUL_SENSE_VOLTAGE: return "SENSE_VOLTAGE";
case SAUL_CLASS_ANY: return "CLASS_ANY";
default: return "CLASS_UNKNOWN";
}