mirror of
https://github.com/LNH-team/pico-launcher.git
synced 2026-06-02 09:06:54 +02:00
Initial commit
This commit is contained in:
25
arm9/source/VBlank.h
Normal file
25
arm9/source/VBlank.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
#include <libtwl/rtos/rtosEvent.h>
|
||||
|
||||
/// @brief Helper class for waiting for vblank.
|
||||
class VBlank
|
||||
{
|
||||
public:
|
||||
static void Init()
|
||||
{
|
||||
rtos_createEvent(&sEvent);
|
||||
}
|
||||
|
||||
static void Wait(bool waitNew = true, bool clearAfter = true)
|
||||
{
|
||||
rtos_waitEvent(&sEvent, waitNew, clearAfter);
|
||||
}
|
||||
|
||||
static void NotifyIrq()
|
||||
{
|
||||
rtos_signalEvent(&sEvent);
|
||||
}
|
||||
|
||||
private:
|
||||
static rtos_event_t sEvent;
|
||||
};
|
||||
Reference in New Issue
Block a user