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:
dongjiuzhu
2020-11-24 13:23:15 -03:00
committed by Matias N
parent 4ce935f711
commit 148afd9548
2 changed files with 169 additions and 64 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff