mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-28 07:42:55 +02:00
uart: use hosversionBetween when possible
This commit is contained in:
parent
3bb619f46e
commit
288a09c4eb
@ -108,14 +108,14 @@ Result uartIsSupportedPortEventForDev(UartPortForDev port, UartPortEventType por
|
|||||||
}
|
}
|
||||||
|
|
||||||
Result uartIsSupportedDeviceVariation(UartPort port, u32 device_variation, bool *out) {
|
Result uartIsSupportedDeviceVariation(UartPort port, u32 device_variation, bool *out) {
|
||||||
if (hosversionBefore(7,0,0) || hosversionAtLeast(17,0,0))
|
if (!hosversionBetween(7,17))
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
return _uartCmdInTwoU32sOutBool(&g_uartSrv, port, device_variation, out, 9);
|
return _uartCmdInTwoU32sOutBool(&g_uartSrv, port, device_variation, out, 9);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result uartIsSupportedDeviceVariationForDev(UartPortForDev port, u32 device_variation, bool *out) {
|
Result uartIsSupportedDeviceVariationForDev(UartPortForDev port, u32 device_variation, bool *out) {
|
||||||
if (hosversionBefore(7,0,0) || hosversionAtLeast(17,0,0))
|
if (!hosversionBetween(7,17))
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
return _uartCmdInTwoU32sOutBool(&g_uartSrv, port, device_variation, out, 10);
|
return _uartCmdInTwoU32sOutBool(&g_uartSrv, port, device_variation, out, 10);
|
||||||
|
Loading…
Reference in New Issue
Block a user