Changes

1,245 bytes added ,  18:32, 7 September 2020
no edit summary
Line 200: Line 200:  
| 8 || [[#IsSupportedPortEventForDev]]
 
| 8 || [[#IsSupportedPortEventForDev]]
 
|-
 
|-
| 9 || [7.0.0+] [[#IsSupportedDevice]]
+
| 9 || [7.0.0+] [[#IsSupportedDeviceVariation]]
 
|-
 
|-
| 10 || [7.0.0+] [[#IsSupportedDeviceForDev]]
+
| 10 || [7.0.0+] [[#IsSupportedDeviceVariationForDev]]
 
|}
 
|}
    
== HasPort ==
 
== HasPort ==
Takes an [[#UartPort]]. Returns a boolean success value.
+
Takes an input [[#UartPort]]. Returns an output boolean success value.
    
== HasPortForDev ==
 
== HasPortForDev ==
Takes an [[#UartPortForDev]]. Returns a boolean success value.
+
Takes an input [[#UartPortForDev]]. Returns an output boolean success value.
    
== IsSupportedBaudRate ==
 
== IsSupportedBaudRate ==
Takes an [[#UartPort]] and an u32 '''BaudRate'''. Returns a boolean success value.
+
Takes an input [[#UartPort]] and an input u32 '''BaudRate'''. Returns an output boolean success value.
    
Supported baud rates are 57600, 115200, 1000000 and 3000000.
 
Supported baud rates are 57600, 115200, 1000000 and 3000000.
    
== IsSupportedBaudRateForDev ==
 
== IsSupportedBaudRateForDev ==
Takes an [[#UartPortForDev]] and an u32 '''BaudRate'''. Returns a boolean success value.
+
Takes an input [[#UartPortForDev]] and an input u32 '''BaudRate'''. Returns an output boolean success value.
    
Supported baud rates are 57600, 115200, 1000000 and 3000000.
 
Supported baud rates are 57600, 115200, 1000000 and 3000000.
    
== IsSupportedFlowControlMode ==
 
== IsSupportedFlowControlMode ==
Takes an [[#UartPort]] and an u32 '''FlowControlMode'''. Returns a boolean success value.
+
Takes an input [[#UartPort]] and an input u32 '''FlowControlMode'''. Returns an output boolean success value.
    
Supported modes are 0 (RTS) and 1 (CTS).
 
Supported modes are 0 (RTS) and 1 (CTS).
    
== IsSupportedFlowControlModeForDev ==
 
== IsSupportedFlowControlModeForDev ==
Takes an [[#UartPortForDev]] and an u32 '''FlowControlMode'''. Returns a boolean success value.
+
Takes an input [[#UartPortForDev]] and an input u32 '''FlowControlMode'''. Returns an output boolean success value.
    
Supported modes are 0 (RTS) and 1 (CTS).
 
Supported modes are 0 (RTS) and 1 (CTS).
    
== CreatePortSession ==
 
== CreatePortSession ==
No input. Returns an [[#IPortSession]].
+
No input. Returns an output [[#IPortSession]].
    
== IsSupportedPortEvent ==
 
== IsSupportedPortEvent ==
Takes an [[#UartPort]] and an u32 '''PortEvent'''. Returns a boolean success value.
+
Takes an input [[#UartPort]] and an input u32 '''PortEvent'''. Returns an output boolean success value.
    
Supported events are 0 (data), 1 (break), 2 (unknown) and 3 (unknown).
 
Supported events are 0 (data), 1 (break), 2 (unknown) and 3 (unknown).
    
== IsSupportedPortEventForDev ==
 
== IsSupportedPortEventForDev ==
Takes an [[#UartPortForDev]] and an u32 '''PortEvent'''. Returns a boolean success value.
+
Takes an input [[#UartPortForDev]] and an input u32 '''PortEvent'''. Returns an output boolean success value.
    
Supported events are 0 (data), 1 (break), 2 (unknown) and 3 (unknown).
 
Supported events are 0 (data), 1 (break), 2 (unknown) and 3 (unknown).
   −
== IsSupportedDevice ==
+
== IsSupportedDeviceVariation ==
Takes an [[#UartPort]] and an u32 '''Device'''. Returns a boolean success value.
+
Takes an input [[#UartPort]] and an input u32 '''DeviceVariation'''. Returns an output boolean success value.
   −
Supported devices are 0 (Bluetooth) for UART-D, 0 (Joy-Con(R)) for UART-B, 0 (Joy-Con(L)) and 1 (MCU) for UART-C.
+
Supported device variations are 0 (Bluetooth) for UART-D, 0 (Joy-Con(R)) for UART-B, 0 (Joy-Con(L)) and 1 (MCU) for UART-C.
   −
== IsSupportedDeviceForDev ==
+
== IsSupportedDeviceVariationForDev ==
Takes an [[#UartPortForDev]] and an u32 '''Device'''. Returns a boolean success value.
+
Takes an input [[#UartPortForDev]] and an input u32 '''DeviceVariation'''. Returns an output boolean success value.
   −
Supported devices are 0 (Bluetooth) for UART-D, 0 (Joy-Con(R)) for UART-B, 0 (Joy-Con(L)) and 1 (MCU) for UART-C.
+
Supported device variations are 0 (Bluetooth) for UART-D, 0 (Joy-Con(R)) for UART-B, 0 (Joy-Con(L)) and 1 (MCU) for UART-C.
    
== IPortSession ==
 
== IPortSession ==
Line 279: Line 279:     
=== OpenPort ===
 
=== OpenPort ===
Takes an [[#UartPort]], 3 u32s, 2 copy handles and 4 u8s (each padded to u32). Returns a boolean success value.
+
Takes an input [[#UartPort]], 2 input u32s '''BaudRate''' and '''FlowControlMode''', 2 input u64s '''SendBufferLength''' and '''ReceiveBufferLength''' and 2 input TransferMemory handles '''SendHandle''' and '''ReceiveHandle'''. Returns an output boolean success value.
   −
[7.0.0+] Now takes an additional u64.
+
[6.0.0+] Takes 4 input u8s (padded as u32) '''IsInvertTx''', '''IsInvertRx''', '''IsInvertRts''' and '''IsInvertCts''', an input [[#UartPort]], 2 input u32s '''BaudRate''' and '''FlowControlMode''', 2 input u64s '''SendBufferLength''' and '''ReceiveBufferLength''' and 2 input TransferMemory handles '''SendHandle''' and '''ReceiveHandle'''. Returns an output boolean success value.
 +
 
 +
[7.0.0+] Takes 4 input u8s (padded as u32) '''IsInvertTx''', '''IsInvertRx''', '''IsInvertRts''' and '''IsInvertCts''', an input [[#UartPort]], 3 input u32s '''BaudRate''', '''FlowControlMode''' and '''DeviceVariation''', 2 input u64s '''SendBufferLength''' and '''ReceiveBufferLength''' and 2 input TransferMemory handles '''SendHandle''' and '''ReceiveHandle'''. Returns an output boolean success value.
    
=== OpenPortForDev ===
 
=== OpenPortForDev ===
Takes an [[#UartPortForDev]], 3 u32s, 2 copy handles and 4 u8s (each padded to u32). Returns a boolean success value.
+
Same as [[#OpenPort]], but takes an input [[#UartPortForDev]] instead.
 
  −
[7.0.0+] Now takes an additional u64.
      
=== GetWritableLength ===
 
=== GetWritableLength ===
No input, returns an output u64.
+
No input. Returns an output u64 '''WritableLength'''.
    
=== Send ===
 
=== Send ===
Takes a type-0x21 input buffer, returns an output u64 size.
+
Takes a type-0x21 input buffer '''DataBytes'''. Returns an output u64 size.
    
=== GetReadableLength ===
 
=== GetReadableLength ===
No input, returns an output u64.
+
No input. Returns an output u64 '''ReadableLength'''.
    
=== Receive ===
 
=== Receive ===
Takes a type-0x22 output buffer, returns an output u64 size.
+
Takes a type-0x22 output buffer '''DataBytes'''. Returns an output u64 size.
    
=== BindPortEvent ===
 
=== BindPortEvent ===
Takes an input u32 and u64, returns an output u8 and an Event handle with EventClearMode=0.
+
Takes an input u32 '''PortEvent''' and an input u64. Returns an output boolean success value and an Event handle with EventClearMode=0.
    
=== UnbindPortEvent ===
 
=== UnbindPortEvent ===
Takes an input u32, returns an output u8.
+
Takes an input u32 '''PortEvent'''. Returns an output boolean success value.
    
= pwm =
 
= pwm =