[NDM] Add exclusive state

This commit is contained in:
wheremyfoodat 2023-09-24 18:22:03 +03:00
parent 77fb6d8f0a
commit d9ddb65b8c
2 changed files with 28 additions and 2 deletions

View file

@ -6,6 +6,8 @@
#include "result/result.hpp"
class NDMService {
enum class ExclusiveState : u32 { None = 0, Infrastructure = 1, LocalComms = 2, StreetPass = 3, StreetPassData = 4 };
Handle handle = KernelHandles::NDM;
Memory& mem;
MAKE_LOG_FUNCTION(log, ndmLogger)
@ -15,11 +17,14 @@ class NDMService {
void enterExclusiveState(u32 messagePointer);
void exitExclusiveState(u32 messagePointer);
void overrideDefaultDaemons(u32 messagePointer);
void queryExclusiveState(u32 messagePointer);
void resumeDaemons(u32 messagePointer);
void resumeScheduler(u32 messagePointer);
void suspendDaemons(u32 messagePointer);
void suspendScheduler(u32 messagePointer);
ExclusiveState exclusiveState = ExclusiveState::None;
public:
NDMService(Memory& mem) : mem(mem) {}
void reset();