## int v24SetParameters

## ( v24_port_t* port, int Baudrate,
int Datasize, int Parity )

> setup the communication parameters.

## Documentation

> After a serial device is opened, the user have to setup the communication parameter. The parameter `port` references the handle of the opened device. With `Baudrate`, the speed can be set as bitrate (bits per second). Use the `__EZV24_BAUDRATE` values as parameter. The size of a transmitted data byte can be passed as `__EZV24_DATASIZE` value to `Datasize`. The last parameter `Parity` defines the parity checking. The possible values are defined in `__EZV24_PARITY_FLAGS`.

> The number of stop bits is set to `1`. If you need `2` stop bits, you have to call v24SetStopbits.

> The values returned are: `V24_E_ILLHANDLE`, `V24_E_ILLBAUD`, `V24_E_ILLDATASZ`, `V24_E_ILLPARITY` and `V24_E_OK`.

Parameters:
  port - pointer to handle of the opened port.
  Baudrate - a `V24_*` constant representing the baudrate.
  Datasize - a `V24_*` constant representing the size of a data byte.
  Parity - a `V24_*` constant representing the parity check mode.
Returns:
  (int) the `V24_*` error code.

Alphabetic index

This page was generated with the help of DOC++.