2016-12-07 23:43:27 -08:00
|
|
|
// Copyright 2016 Citra Emulator Project
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
2016-12-29 12:38:47 -08:00
|
|
|
#include "core/hle/kernel/event.h"
|
2016-12-07 23:43:27 -08:00
|
|
|
#include "core/hle/service/nfc/nfc.h"
|
|
|
|
#include "core/hle/service/nfc/nfc_m.h"
|
|
|
|
#include "core/hle/service/nfc/nfc_u.h"
|
|
|
|
|
|
|
|
namespace Service {
|
|
|
|
namespace NFC {
|
|
|
|
|
2016-12-29 12:38:47 -08:00
|
|
|
static Kernel::SharedPtr<Kernel::Event> tag_in_range_event;
|
|
|
|
|
|
|
|
void GetTagInRangeEvent(Interface* self) {
|
|
|
|
u32* cmd_buff = Kernel::GetCommandBuffer();
|
|
|
|
|
|
|
|
cmd_buff[0] = IPC::MakeHeader(0xB, 1, 2);
|
|
|
|
cmd_buff[1] = RESULT_SUCCESS.raw;
|
|
|
|
cmd_buff[2] = IPC::CopyHandleDesc();
|
|
|
|
cmd_buff[3] = Kernel::g_handle_table.Create(tag_in_range_event).MoveFrom();
|
|
|
|
LOG_WARNING(Service_NFC, "(STUBBED) called");
|
|
|
|
}
|
|
|
|
|
2016-12-07 23:43:27 -08:00
|
|
|
void Init() {
|
|
|
|
AddService(new NFC_M());
|
|
|
|
AddService(new NFC_U());
|
2016-12-29 12:38:47 -08:00
|
|
|
|
|
|
|
tag_in_range_event =
|
|
|
|
Kernel::Event::Create(Kernel::ResetType::OneShot, "NFC::tag_in_range_event");
|
|
|
|
}
|
|
|
|
|
|
|
|
void Shutdown() {
|
|
|
|
tag_in_range_event = nullptr;
|
2016-12-07 23:43:27 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace NFC
|
|
|
|
} // namespace Service
|