Skip to content

Commit d25f919

Browse files
drivers/saul: add class and string for size measurements
1 parent 09de4e3 commit d25f919

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

drivers/include/saul.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ enum {
134134
SAUL_SENSE_ID_VOLTAGE, /**< sensor: voltage */
135135
SAUL_SENSE_ID_PH, /**< sensor: pH */
136136
SAUL_SENSE_ID_POWER, /**< sensor: power */
137+
SAUL_SENSE_ID_SIZE, /**< sensor: size */
137138
SAUL_SENSE_NUMOF /**< Number of actuators supported */
138139
/* Extend this list as needed, but keep SAUL_SENSE_ID_ANY the first and
139140
* SAUL_SENSE_NUMOF the last entry
@@ -180,6 +181,7 @@ enum {
180181
SAUL_SENSE_VOLTAGE = SAUL_CAT_SENSE | SAUL_SENSE_ID_VOLTAGE, /**< sensor: voltage */
181182
SAUL_SENSE_PH = SAUL_CAT_SENSE | SAUL_SENSE_ID_PH, /**< sensor: pH */
182183
SAUL_SENSE_POWER = SAUL_CAT_SENSE | SAUL_SENSE_ID_POWER, /**< sensor: power */
184+
SAUL_SENSE_SIZE = SAUL_CAT_SENSE | SAUL_SENSE_ID_SIZE, /**< sensor: size */
183185
SAUL_CLASS_ANY = 0xff /**< any device - wildcard */
184186
/* extend this list as needed... */
185187
};

drivers/saul/saul_str.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ static const char *sensors[] = {
6262
[SAUL_SENSE_ID_VOLTAGE] = "SENSE_VOLTAGE",
6363
[SAUL_SENSE_ID_PH] = "SENSE_PH",
6464
[SAUL_SENSE_ID_POWER] = "SENSE_POWER",
65+
[SAUL_SENSE_ID_SIZE] = "SENSE_SIZE",
6566
};
6667

6768
const char *saul_class_to_str(const uint8_t class_id)

0 commit comments

Comments
 (0)