diff --git a/drivers/include/saul.h b/drivers/include/saul.h index 75b12ca5737af44981150060b549787ba36106b6..f6b0237d97eddc0857f7b2d65dbbff22c3697e01 100644 --- a/drivers/include/saul.h +++ b/drivers/include/saul.h @@ -98,6 +98,7 @@ enum { SAUL_SENSE_TVOC = 0x90, /**< sensor: TVOC Gas */ SAUL_SENSE_OCCUP = 0x91, /**< sensor: occupancy */ SAUL_SENSE_PROXIMITY= 0x92, /**< sensor: proximity */ + SAUL_SENSE_RSSI = 0x93, /**< sensor: RSSI */ 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 32233c73c00d16222e12147d9bb02bcdbe211974..712a04a3ade3d21a0422cd610cf5cbf0d72bfd41 100644 --- a/drivers/saul/saul_str.c +++ b/drivers/saul/saul_str.c @@ -54,6 +54,7 @@ const char *saul_class_to_str(const uint8_t class_id) case SAUL_SENSE_CO2: return "SENSE_CO2"; case SAUL_SENSE_TVOC: return "SENSE_TVOC"; case SAUL_SENSE_PROXIMITY: return "SENSE_PROXIMITY"; + case SAUL_SENSE_RSSI: return "SENSE_RSSI"; case SAUL_CLASS_ANY: return "CLASS_ANY"; case SAUL_SENSE_OCCUP: return "SENSE_OCCUP"; default: return "CLASS_UNKNOWN"; diff --git a/sys/include/phydat.h b/sys/include/phydat.h index 77062314f3975fd0474c88a8c42d5dfa3c638e35..96e7c87817f236eb4f4df7044928817dc5ea5e82 100644 --- a/sys/include/phydat.h +++ b/sys/include/phydat.h @@ -94,6 +94,7 @@ enum { UNIT_A, /**< Ampere */ UNIT_V, /**< Volts */ UNIT_GS, /**< gauss */ + UNIT_DBM, /**< decibel-milliwatts */ /* pressure */ UNIT_BAR, /**< Beer? */ UNIT_PA, /**< Pascal */ diff --git a/sys/phydat/phydat_str.c b/sys/phydat/phydat_str.c index a10fd7aee64a80e2a07d133e2a259c29c9bd4506..c97666ee9489789d0c465b13655b1fd2ac9d7ee9 100644 --- a/sys/phydat/phydat_str.c +++ b/sys/phydat/phydat_str.c @@ -42,6 +42,7 @@ void phydat_dump(phydat_t *data, uint8_t dim) case UNIT_PERCENT: case UNIT_TEMP_C: case UNIT_TEMP_F: + case UNIT_DBM: /* no string conversion */ scale_prefix = '\0'; break; @@ -91,6 +92,7 @@ const char *phydat_unit_to_str(uint8_t unit) case UNIT_GR: return "G"; case UNIT_A: return "A"; case UNIT_V: return "V"; + case UNIT_DBM: return "dBm"; case UNIT_GS: return "Gs"; case UNIT_BAR: return "Bar"; case UNIT_PA: return "Pa";