* **channel**: RS-232 ''channel'' number. ''Channel'' 0 maps to UART0 (GP0/GP1) and ''channel'' 1 maps to UART1 (GP4/GP5).
-
* **baudRate**: Serial baud rate. The documentation allows values between 2400 and 230400.
-
* **protocol**: Bit-packed serial format. Bit 2 selects one or two stop bits. Bits 1..0 select 5, 6, 7, or 8 data bits. Bits 4..3 select parity where 00 is none, 10 is even, and 11 is odd.
-
* **recvSize**: Receive buffer size in bytes. Maximum documented value is 1024.
-
* **sendSize**: Send buffer size in bytes. Maximum documented value is 1024.
-
-
===== Exceptions =====
-
-
* [[https://docs.micropython.org/en/latest/library/builtins.html#TypeError|TypeError]]: One of the arguments is not an integer.
-
* [[https://docs.micropython.org/en/latest/library/builtins.html#ValueError|ValueError]]: The supplied values are outside the documented range.
-
-
===== Example =====
-
-
<code python>
-
from cubloc import OpenCom
-
-
# Example usage
-
OpenCom(0, 1, 1, 1, 1)
-
</code>
-
-
===== Related APIs =====
-
-
* [[logicpython:cubloc_api:setmodbus|SetModbus]]
logicpython/cubloc_api/opencom.1775804909.txt.gz · Last modified: by mfranklin