Implement NFC::GetTagState
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user