mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-03 12:27:21 +12:00
Implement NFC::GetTagState
This commit is contained in:
parent
ceb3f05c7e
commit
80f1de728c
2 changed files with 28 additions and 4 deletions
|
@ -14,22 +14,34 @@ class NFCService {
|
|||
Kernel& kernel;
|
||||
MAKE_LOG_FUNCTION(log, nfcLogger)
|
||||
|
||||
enum class Old3DSAdapterStatus : s32 {
|
||||
enum class Old3DSAdapterStatus : u32 {
|
||||
Idle = 0,
|
||||
AttemptingToInitialize = 1,
|
||||
InitializationComplete = 2,
|
||||
// Other values are errors according to 3DBrew, set the not initialized error to -1 until we find out what it should be
|
||||
NotInitialized = -1,
|
||||
Active = 3,
|
||||
};
|
||||
|
||||
enum class TagStatus : u8 {
|
||||
NotInitialized = 0,
|
||||
Initialized = 1,
|
||||
Scanning = 2,
|
||||
InRange = 3,
|
||||
OutOfRange = 4,
|
||||
Loaded = 5,
|
||||
};
|
||||
|
||||
// Kernel events signaled when an NFC tag goes in and out of range respectively
|
||||
std::optional<Handle> tagInRangeEvent, tagOutOfRangeEvent;
|
||||
|
||||
Old3DSAdapterStatus adapterStatus;
|
||||
TagStatus tagStatus;
|
||||
|
||||
// Service commands
|
||||
void communicationGetStatus(u32 messagePointer);
|
||||
void initialize(u32 messagePointer);
|
||||
void getTagInRangeEvent(u32 messagePointer);
|
||||
void getTagOutOfRangeEvent(u32 messagePointer);
|
||||
void getTagState(u32 messagePointer);
|
||||
void stopCommunication(u32 messagePointer);
|
||||
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue