esp_vfs_select() function
Synchronous I/O multiplexing which implements the functionality of POSIX select() for VFS
Arguments
nfds
Specifies the range of descriptors which should be checked. The first nfds descriptors will be checked in each set.
readfds
If not NULL, then points to a descriptor set that on input specifies which descriptors should be checked for being ready to read, and on output indicates which descriptors are ready to read.
writefds
If not NULL, then points to a descriptor set that on input specifies which descriptors should be checked for being ready to write, and on output indicates which descriptors are ready to write.
errorfds
If not NULL, then points to a descriptor set that on input specifies which descriptors should be checked for error conditions, and on output indicates which descriptors have error conditions.
timeout
If not NULL, then points to timeval structure which specifies the time period after which the functions should time-out and return. If it is NULL, then the function will not time-out. Note that the timeout period is rounded up to the system tick and incremented by one.
Return value
The number of descriptors set in the descriptor sets, or -1 when an error (specified by errno) have occurred.