You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/11/22 15:53:51 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #2369: driver/sensors: support custom types of sensor.

xiaoxiang781216 commented on a change in pull request #2369:
URL: https://github.com/apache/incubator-nuttx/pull/2369#discussion_r528354442



##########
File path: drivers/sensors/sensor.c
##########
@@ -98,6 +99,7 @@ static int     sensor_poll(FAR struct file *filep, FAR struct pollfd *fds,
 
 static const struct sensor_info g_sensor_info[] =
 {
+  {1,                                 "custom"},

Review comment:
       1 means the element size is one byte, but it can be any value since the first entry content isn't really used by the code. It is just a placehold to avoid other place reference the entry by (type + 1).
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org