This command sets the serial port USIF1 speed. The default serial port USIF1 speed is 115200.
The first input parameter speed is a Python string which is the value of the serial port speed. It can assume the values in the range from '300' to '115200'.
The second optional parameter <char format> is a Python string that represents the character format to be used:
The first character is the number of bits per char (7 or 8), then the parity setting (N - none, E- even, O- odd) and in the end the number of stop bits (1 or 2). The default value is "8N1".
The return value is a Python integer which is -1 if an error occurred otherwise is 1.
Example:
b = SER2.set_speed('9600')
sets the serial port USIF1 speed to 9600, assigning the return value to b.