Added resumable loading, along with signal handling.

This version can store state after receiving SIGINT.
This is achieved by polling FIFO read state;
This commit is contained in:
2018-08-09 20:23:23 +00:00
parent 673577a601
commit 48840ad36c
29 changed files with 598 additions and 233 deletions

7
IO.hpp
View File

@@ -3,4 +3,9 @@
#include <cstdint>
#include <vector>
std::vector<uint8_t> readBytes(const size_t count);
//Returns either the number of bytes specified,
//or returns empty vector without discarding bytes from HID stream
std::vector<uint8_t> readNonBlock(const size_t count);
//Blocking write to HID stream - shouldn't block for too long
void write(const uint8_t* bytes, const size_t count);