drivers/saul: add class and string for size measurements
This commit is contained in:
parent
b5658e61a5
commit
46091b6b43
@ -134,6 +134,7 @@ enum {
|
|||||||
SAUL_SENSE_ID_VOLTAGE, /**< sensor: voltage */
|
SAUL_SENSE_ID_VOLTAGE, /**< sensor: voltage */
|
||||||
SAUL_SENSE_ID_PH, /**< sensor: pH */
|
SAUL_SENSE_ID_PH, /**< sensor: pH */
|
||||||
SAUL_SENSE_ID_POWER, /**< sensor: power */
|
SAUL_SENSE_ID_POWER, /**< sensor: power */
|
||||||
|
SAUL_SENSE_ID_SIZE, /**< sensor: size */
|
||||||
SAUL_SENSE_NUMOF /**< Number of actuators supported */
|
SAUL_SENSE_NUMOF /**< Number of actuators supported */
|
||||||
/* Extend this list as needed, but keep SAUL_SENSE_ID_ANY the first and
|
/* Extend this list as needed, but keep SAUL_SENSE_ID_ANY the first and
|
||||||
* SAUL_SENSE_NUMOF the last entry
|
* SAUL_SENSE_NUMOF the last entry
|
||||||
@ -180,6 +181,7 @@ enum {
|
|||||||
SAUL_SENSE_VOLTAGE = SAUL_CAT_SENSE | SAUL_SENSE_ID_VOLTAGE, /**< sensor: voltage */
|
SAUL_SENSE_VOLTAGE = SAUL_CAT_SENSE | SAUL_SENSE_ID_VOLTAGE, /**< sensor: voltage */
|
||||||
SAUL_SENSE_PH = SAUL_CAT_SENSE | SAUL_SENSE_ID_PH, /**< sensor: pH */
|
SAUL_SENSE_PH = SAUL_CAT_SENSE | SAUL_SENSE_ID_PH, /**< sensor: pH */
|
||||||
SAUL_SENSE_POWER = SAUL_CAT_SENSE | SAUL_SENSE_ID_POWER, /**< sensor: power */
|
SAUL_SENSE_POWER = SAUL_CAT_SENSE | SAUL_SENSE_ID_POWER, /**< sensor: power */
|
||||||
|
SAUL_SENSE_SIZE = SAUL_CAT_SENSE | SAUL_SENSE_ID_SIZE, /**< sensor: size */
|
||||||
SAUL_CLASS_ANY = 0xff /**< any device - wildcard */
|
SAUL_CLASS_ANY = 0xff /**< any device - wildcard */
|
||||||
/* extend this list as needed... */
|
/* extend this list as needed... */
|
||||||
};
|
};
|
||||||
|
|||||||
@ -62,6 +62,7 @@ static const char *sensors[] = {
|
|||||||
[SAUL_SENSE_ID_VOLTAGE] = "SENSE_VOLTAGE",
|
[SAUL_SENSE_ID_VOLTAGE] = "SENSE_VOLTAGE",
|
||||||
[SAUL_SENSE_ID_PH] = "SENSE_PH",
|
[SAUL_SENSE_ID_PH] = "SENSE_PH",
|
||||||
[SAUL_SENSE_ID_POWER] = "SENSE_POWER",
|
[SAUL_SENSE_ID_POWER] = "SENSE_POWER",
|
||||||
|
[SAUL_SENSE_ID_SIZE] = "SENSE_SIZE",
|
||||||
};
|
};
|
||||||
|
|
||||||
const char *saul_class_to_str(const uint8_t class_id)
|
const char *saul_class_to_str(const uint8_t class_id)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user