[SerialImpl]: add function to return pollfd

This commit is contained in:
Alexander Lerach
2025-12-09 18:42:46 +01:00
parent 73a8fc8fb0
commit f0d40d7a43
6 changed files with 29 additions and 0 deletions
@@ -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);