User Tools

Site Tools

한국어

logicpython:cubloc_api:setrs232

This is an old revision of the document!


SetRS232

Reconfigure an already-open RS-232 channel with a new baud rate and protocol.

Syntax

from cubloc import SetRS232
 
SetRS232(channel: int, baudRate: int, protocol: int)

Parameters

  • channel: RS-232 channel number. Channel 0 maps to UART0 and channel 1 maps to UART1.
  • baudRate: Serial baud rate.
  • protocol: Bit-packed serial format matching OpenCom.

Exceptions

  • TypeError: One of the arguments is not an integer.
  • ValueError: The supplied values are outside the supported range.
  • RuntimeError: OpenCom has not been called for this channel.

Example

from cubloc import SetRS232
 
# Example usage
SetRS232(0, 1, 1)
logicpython/cubloc_api/setrs232.1775786799.txt.gz · Last modified: by 127.0.0.1