diff --git a/firmware/baseband/stream_input.hpp b/firmware/baseband/stream_input.hpp index ed508aaa..6e03c500 100644 --- a/firmware/baseband/stream_input.hpp +++ b/firmware/baseband/stream_input.hpp @@ -47,11 +47,18 @@ public: } size_t write(const void* const data, const size_t length) { - return fifo.in(reinterpret_cast(data), length); + const auto written = fifo.in(reinterpret_cast(data), length); + bytes_written += written; + return written; + } + + uint64_t written() const { + return bytes_written; } private: const size_t K; + uint64_t bytes_written = 0; std::unique_ptr data; FIFO fifo; };