mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 11:23:34 +08:00
[SerialImpl]: add function to return pollfd
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
|
||||
#include <SerialImpl.hpp>
|
||||
|
||||
#include <px4_platform_common/posix.h>
|
||||
#include <px4_platform_common/SerialCommon.hpp>
|
||||
|
||||
using device::SerialConfig::ByteSize;
|
||||
@@ -61,6 +62,8 @@ public:
|
||||
|
||||
bool close();
|
||||
|
||||
bool getPollFd(const px4_pollevent_t events, px4_pollfd_struct_t *pfd);
|
||||
|
||||
ssize_t bytesAvailable();
|
||||
ssize_t read(uint8_t *buffer, size_t buffer_size);
|
||||
ssize_t readAtLeast(uint8_t *buffer, size_t buffer_size, size_t character_count = 1, uint32_t timeout_ms = 0);
|
||||
|
||||
Reference in New Issue
Block a user