/* Opens the connection with the serial port configured as 8,N,1 and no flow control.  */
static uint32_t SerialConvertBaudrate(tSerialPortBaudrate baudrate)
/* Opens the connection with the serial port configured as 8,N,1 and no flow control.  */
static uint32_t SerialConvertBaudrate(tSerialPortBaudrate baudrate)
{
  uint32_t result;
  switch (baudrate)
  {
    case SERIALPORT_BR9600:
      result = CBR_9600;
      break;
    case SERIALPORT_BR19200:
      result = CBR_19200;
      break;
    case SERIALPORT_BR38400:
      result = CBR_38400;
      break;
    case SERIALPORT_BR57600:
      result = CBR_57600;
      break;
    case SERIALPORT_BR115200:
      result = CBR_115200;
      break;
    default:
      result = CBR_9600;
      break;
  }
  return result;
}