diff --git a/drivers/sensors/sensor.c b/drivers/sensors/sensor.c index 1e8aa6e127ec7..5bfdaba006356 100644 --- a/drivers/sensors/sensor.c +++ b/drivers/sensors/sensor.c @@ -218,6 +218,7 @@ static const struct sensor_meta_s g_sensor_meta[] = {sizeof(struct sensor_pm25), "pm25"}, {sizeof(struct sensor_pm10), "pm10"}, {sizeof(struct sensor_uv), "uv"}, + {sizeof(struct sensor_eng), "eng"}, }; static const struct file_operations g_sensor_fops = diff --git a/include/nuttx/uorb.h b/include/nuttx/uorb.h index 4b74ddfbedb68..067e997d5dba5 100644 --- a/include/nuttx/uorb.h +++ b/include/nuttx/uorb.h @@ -475,7 +475,6 @@ /* GNSS Geofence */ #define SENSOR_TYPE_GNSS_GEOFENCE 52 - /* Velocity Sensor * A sensor of this type measures the velocity as it is moving. * The default unit velocity is meter by seconds m/s (SI). @@ -511,11 +510,20 @@ #define SENSOR_TYPE_ULTRAVIOLET 57 +/* ENG (Electroneurography) + * A sensor of this type measures the electrical activity of peripheral + * nerves. This neural electrical signal, generated by nerve impulses + * traveling through axons and captured by electrodes, provides valuable + * information about nervous system and muscle-nerve communication. + */ + +#define SENSOR_TYPE_ENG 58 + /* The total number of sensor * please increase it if you added a new sensor type! */ -#define SENSOR_TYPE_COUNT 58 +#define SENSOR_TYPE_COUNT 59 /* The additional sensor open flags */ @@ -902,6 +910,13 @@ struct sensor_cap /* Type: Capacitance */ int32_t rawdata[4]; /* in SI units pF */ }; +struct sensor_eng /* Type: ENG */ +{ + uint64_t timestamp; /* Unit is microseconds */ + float voltage[4]; /* Voltage unit in mV */ + uint32_t stat; /* Status. bit3:0 - value 3:0 is valid or not */ +}; + struct sensor_gnss /* Type: GNSS */ { uint64_t timestamp; /* Time since system start, Units is microseconds */