1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-12-25 18:06:06 +00:00
nxdumptool/source/set_ext.c

29 lines
599 B
C
Raw Normal View History

2019-06-09 02:36:21 +01:00
#include <switch/arm/atomics.h>
#include <switch/services/sm.h>
#include <switch/types.h>
#include <stdlib.h>
#include <string.h>
#include "set_ext.h"
2019-12-11 08:56:58 +00:00
#include "service_guard.h"
2019-06-09 02:36:21 +01:00
static Service g_setcalSrv;
2019-12-11 08:56:58 +00:00
NX_GENERATE_SERVICE_GUARD(setcal);
Result _setcalInitialize() {
2019-06-09 02:36:21 +01:00
return smGetService(&g_setcalSrv, "set:cal");
}
2019-12-11 08:56:58 +00:00
void _setcalCleanup() {
serviceClose(&g_setcalSrv);
2019-06-09 02:36:21 +01:00
}
Result setcalGetEticketDeviceKey(void *key)
{
2019-12-11 08:56:58 +00:00
return serviceDispatch(&g_setcalSrv, 21,
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
.buffers = { { key, 0x244 } },
);
2019-06-09 02:36:21 +01:00
}