px4_pollfd_struct_t fds[] = {
{ .fd = sensor_sub_fd, .events = POLLIN },
/* there could be more file descriptors here, in the form like:
* { .fd = other_sub_fd, .events = POLLIN },
*/
};
typedef struct {
/* This part of the struct is POSIX-like */
int fd; /* The descriptor being polled */
pollevent_t events; /* The input event flags */
pollevent_t revents; /* The output event flags */
/* Required for PX4 compatibility */
px4_sem_t *sem; /* Pointer to semaphore used to post output event */
void *priv; /* For use by drivers */
} px4_pollfd_struct_t;
PX4 代码疑惑(1)
最新推荐文章于 2021-11-01 10:39:01 发布