diff --git a/drivers/include/saul.h b/drivers/include/saul.h index b8a62d145e..7cace775a1 100644 --- a/drivers/include/saul.h +++ b/drivers/include/saul.h @@ -104,6 +104,7 @@ enum { SAUL_SENSE_PM = 0x96, /**< sensor: particulate matter */ SAUL_SENSE_CAPACITANCE = 0x97, /**< sensor: capacitance */ SAUL_SENSE_VOLTAGE = 0x98, /**< sensor: voltage */ + SAUL_SENSE_PH = 0x99, /**< sensor: pH */ 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 45c5b4eaaa..12150c0e9d 100644 --- a/drivers/saul/saul_str.c +++ b/drivers/saul/saul_str.c @@ -61,6 +61,7 @@ const char *saul_class_to_str(const uint8_t class_id) case SAUL_SENSE_PM: return "SENSE_PM"; case SAUL_SENSE_CAPACITANCE: return "SENSE_CAPACITANCE"; case SAUL_SENSE_VOLTAGE: return "SENSE_VOLTAGE"; + case SAUL_SENSE_PH: return "SENSE_PH"; case SAUL_CLASS_ANY: return "CLASS_ANY"; default: return "CLASS_UNKNOWN"; } diff --git a/sys/include/phydat.h b/sys/include/phydat.h index d56f968ed1..60a96775d4 100644 --- a/sys/include/phydat.h +++ b/sys/include/phydat.h @@ -97,6 +97,8 @@ enum { UNIT_DBM, /**< decibel-milliwatts */ UNIT_COULOMB, /**< coulomb */ UNIT_F, /**< Farad */ + /* electrochemical */ + UNIT_PH, /**< pH */ /* pressure */ UNIT_BAR, /**< Beer? */ UNIT_PA, /**< Pascal */ diff --git a/sys/phydat/phydat_str.c b/sys/phydat/phydat_str.c index ff9e9ad8dc..1d847ac624 100644 --- a/sys/phydat/phydat_str.c +++ b/sys/phydat/phydat_str.c @@ -104,6 +104,7 @@ const char *phydat_unit_to_str(uint8_t unit) case UNIT_COULOMB: return "C"; case UNIT_GPM3: return "g/m^3"; case UNIT_F: return "F"; + case UNIT_PH: return "pH"; default: return ""; } }