mirror of
https://github.com/apache/nuttx.git
synced 2026-09-28 15:54:57 +08:00
driver/sensors: support custom type of sensor.
For examples, the custom sensor could define:
struct custem_event_s
{
uint64_t timestamp;
int16_t adc[8];
};
struct sensor_lowerhalf_s g_lower =
{
.buffer_size = 1024,
};
sensor_custom_register(lower, "/dev/sensor/custom0", sizeof(struct custem_event_s));
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
This commit is contained in: