This functions provide the functionality that is required to setup and configure a port.
Function Documentation
closes and deinitializes the port
- Parameters:
-
io_portH | pointer to port handle to close. The handle will be invalidated. |
- Returns:
- PSL_ERROR_none if successful else another error code
tries to open the specified serial port
- Parameters:
-
i_portName | name of the port to open
These names are indeed some kind of platform specific - sorry. But you may get a list of possible ports from |
- See also:
- PSerLib_getAvailablePorts.
- Parameters:
-
o_handle | pointer to a handle variable that receives the handle to the opened port on success or PSL_NOPORT_HANDLE if opening failed |
- Returns:
- PSL_ERROR_none if successful else another error code
sets the port to the given configuration
- Attention:
- currently not all baud rates are supported on linux (have to figure out how to set custom baud rates that are not defined in termios)
- Todo:
- support all enumerated and custom baud rates
- Parameters:
-
io_port | handle of port to be configured |
i_baudrate | baudrate if argument is less than PSL_BR_CONSTANTS_COUNT it is interpreted as one of the enumerated constants. If it is larger it is interpreted as baudrate. |
i_bits | number of data bits |
i_parity | parity |
i_stopbits | number of stopbits |
i_flowControl | flow control to use |
- Returns:
- PSL_ERROR_none if successful else another error code