mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-10-16 01:42:05 +00:00
Simplify MessageQueue pop() usage.
This commit is contained in:
@@ -47,8 +47,9 @@ public:
|
||||
return push(&message, sizeof(message));
|
||||
}
|
||||
|
||||
size_t pop(void* const buf, const size_t len) {
|
||||
return fifo.out_r(buf, len);
|
||||
const Message* pop(std::array<uint8_t, Message::MAX_SIZE>& buf) {
|
||||
const Message* const p = reinterpret_cast<Message*>(buf.data());
|
||||
return fifo.out_r(buf.data(), buf.size()) ? p : nullptr;
|
||||
}
|
||||
|
||||
size_t len() const {
|
||||
|
Reference in New Issue
Block a user