hid: Minor Palma improvements.

This commit is contained in:
yellows8 2020-12-27 00:58:15 -05:00
parent 73feb933ce
commit a35321b360
No known key found for this signature in database
GPG Key ID: 0AF90DA3F1E60E43
2 changed files with 8 additions and 8 deletions

View File

@ -2164,10 +2164,10 @@ Result hidResetPalmaStep(HidPalmaConnectionHandle handle);
* @note See \ref hidGetPalmaOperationInfo. * @note See \ref hidGetPalmaOperationInfo.
* @note Only available on [5.0.0+]. * @note Only available on [5.0.0+].
* @param[in] handle \ref HidPalmaConnectionHandle * @param[in] handle \ref HidPalmaConnectionHandle
* @param[in] inval0 First input value. This must be within the size of \ref HidPalmaApplicationSectionAccessBuffer. * @param[in] inval0 First input value.
* @param[in] inval1 Second input value. * @param[in] size This must be within the size of \ref HidPalmaApplicationSectionAccessBuffer.
*/ */
Result hidReadPalmaApplicationSection(HidPalmaConnectionHandle handle, s32 inval0, u64 inval1); Result hidReadPalmaApplicationSection(HidPalmaConnectionHandle handle, s32 inval0, u64 size);
/** /**
* @brief WritePalmaApplicationSection * @brief WritePalmaApplicationSection
@ -2178,7 +2178,7 @@ Result hidReadPalmaApplicationSection(HidPalmaConnectionHandle handle, s32 inval
* @param[in] size Size of the data in \ref HidPalmaApplicationSectionAccessBuffer. * @param[in] size Size of the data in \ref HidPalmaApplicationSectionAccessBuffer.
* @param[in] buf \ref HidPalmaApplicationSectionAccessBuffer * @param[in] buf \ref HidPalmaApplicationSectionAccessBuffer
*/ */
Result hidWritePalmaApplicationSection(HidPalmaConnectionHandle handle, s32 inval0, u64 inval1, const HidPalmaApplicationSectionAccessBuffer *buf); Result hidWritePalmaApplicationSection(HidPalmaConnectionHandle handle, s32 inval0, u64 size, const HidPalmaApplicationSectionAccessBuffer *buf);
/** /**
* @brief ReadPalmaUniqueCode * @brief ReadPalmaUniqueCode

View File

@ -2118,18 +2118,18 @@ Result hidResetPalmaStep(HidPalmaConnectionHandle handle) {
return _hidCmdInU64NoOut(&g_hidSrv, handle.handle, 508); return _hidCmdInU64NoOut(&g_hidSrv, handle.handle, 508);
} }
Result hidReadPalmaApplicationSection(HidPalmaConnectionHandle handle, s32 inval0, u64 inval1) { Result hidReadPalmaApplicationSection(HidPalmaConnectionHandle handle, s32 inval0, u64 size) {
if (hosversionBefore(5,0,0)) if (hosversionBefore(5,0,0))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
if (inval0 > sizeof(HidPalmaApplicationSectionAccessBuffer)) if (size > sizeof(HidPalmaApplicationSectionAccessBuffer))
return MAKERESULT(Module_Libnx, LibnxError_BadInput); return MAKERESULT(Module_Libnx, LibnxError_BadInput);
const struct { const struct {
HidPalmaConnectionHandle handle; HidPalmaConnectionHandle handle;
u64 inval0; u64 inval0;
u64 inval1; u64 size;
} in = { handle, inval0, inval1 }; } in = { handle, inval0, size };
return serviceDispatchIn(&g_hidSrv, 509, in); return serviceDispatchIn(&g_hidSrv, 509, in);
} }