mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-07-05 06:42:57 +12:00
IR: Move to scheduler
This commit is contained in:
parent
b2904f391f
commit
dc7f8a48bd
7 changed files with 29 additions and 14 deletions
|
@ -3,6 +3,7 @@
|
|||
#include <span>
|
||||
|
||||
#include "helpers.hpp"
|
||||
#include "scheduler.hpp"
|
||||
|
||||
namespace IR {
|
||||
class Device {
|
||||
|
@ -11,6 +12,7 @@ namespace IR {
|
|||
|
||||
protected:
|
||||
using SendCallback = std::function<void(Payload)>; // Callback for sending data from IR device->3DS
|
||||
Scheduler& scheduler;
|
||||
SendCallback sendCallback;
|
||||
|
||||
public:
|
||||
|
@ -18,6 +20,6 @@ namespace IR {
|
|||
virtual void disconnect() = 0;
|
||||
virtual void receivePayload(Payload payload) = 0;
|
||||
|
||||
Device(SendCallback sendCallback) : sendCallback(sendCallback) {}
|
||||
Device(SendCallback sendCallback, Scheduler& scheduler) : sendCallback(sendCallback), scheduler(scheduler) {}
|
||||
};
|
||||
} // namespace IR
|
Loading…
Add table
Add a link
Reference in a new issue