Skip to content
Snippets Groups Projects
Commit 5835d1f5 authored by Niccolò Betto's avatar Niccolò Betto
Browse files

[SerialTransceiver] Properly implement the receive function

parent 496c5768
Branches
No related tags found
1 merge request!288[SerialTransceiver] Properly implement the receive function
Pipeline #9219 passed
...@@ -44,7 +44,9 @@ public: ...@@ -44,7 +44,9 @@ public:
ssize_t receive(uint8_t* packet, size_t packetLength) ssize_t receive(uint8_t* packet, size_t packetLength)
{ {
return usart.readBlocking(packet, packetLength); size_t bytesRead = 0;
bool result = usart.readBlocking(packet, packetLength, bytesRead);
return result ? bytesRead : 0;
} }
private: private:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment