nfc: Replaced the handle within NfcDeviceHandle with an u8-array. Removed PACKED from the nfpCreateApplicationArea in-struct. Improved bool handling.

This commit is contained in:
yellows8 2019-10-25 19:11:03 -04:00
parent 5700b8f347
commit 04179b286d
No known key found for this signature in database
GPG Key ID: 0AF90DA3F1E60E43
2 changed files with 3 additions and 3 deletions

View File

@ -144,7 +144,7 @@ typedef struct {
/// Nfc/Nfp DeviceHandle
typedef struct {
u64 handle; ///< Handle.
u8 handle[0x8]; ///< Handle.
} NfcDeviceHandle;
/**

View File

@ -189,7 +189,7 @@ static Result _nfcCmdNoInOutU8(Service* srv, u8 *out, u32 cmd_id) {
static Result _nfcCmdNoInOutBool(Service* srv, bool *out, u32 cmd_id) {
u8 tmp=0;
Result rc = _nfcCmdNoInOutU8(srv, &tmp, cmd_id);
if (R_SUCCEEDED(rc) && out) *out = tmp!=0;
if (R_SUCCEEDED(rc) && out) *out = tmp & 1;
return rc;
}
@ -307,7 +307,7 @@ Result nfpCreateApplicationArea(const NfcDeviceHandle *handle, u32 app_id, const
const struct {
NfcDeviceHandle handle;
u32 app_id;
} PACKED in = { *handle, app_id };
} in = { *handle, app_id };
serviceAssumeDomain(&g_nfpInterface);
return serviceDispatchIn(&g_nfpInterface, 12, in,