mirror of
https://github.com/LNH-team/dspico-usb-examples.git
synced 2026-06-02 09:16:50 +02:00
Added usb video example
This commit is contained in:
19
examples/usb-video/common/IpcService.h
Normal file
19
examples/usb-video/common/IpcService.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
#include <libtwl/ipc/ipcFifoSystem.h>
|
||||
|
||||
class IpcService
|
||||
{
|
||||
const u32 _ipcChannel;
|
||||
protected:
|
||||
explicit IpcService(u32 ipcChannel)
|
||||
: _ipcChannel(ipcChannel) { }
|
||||
|
||||
void SendResponseMessage(u32 data) const
|
||||
{
|
||||
ipc_sendFifoMessage(_ipcChannel, data);
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void Start();
|
||||
virtual void OnMessageReceived(u32 data) = 0;
|
||||
};
|
||||
Reference in New Issue
Block a user