mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-22 04:52:39 +02:00
hid: Minor Palma improvements.
This commit is contained in:
parent
73feb933ce
commit
a35321b360
@ -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
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user