QextSerialPort add new BaudRate



  • Hey, I want to add the "691200" and "921600" baud rate to the Qextserialport baud rates list.

    1. I add the b.r. values to the enum BaudRateType.

    2. On the "setBaudRate" function I add this cases:
      @
      /691200 baud/
      case BAUD691200:
      TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning: POSIX does not support 691200 baud operation.");
      Win_CommConfig.dcb.BaudRate=CBR_691200;
      break;

          /*921600 baud*/
          case BAUD921600:
               TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning: POSIX does not support 921600 baud operation.");
               Win_CommConfig.dcb.BaudRate=CBR_921600;
               break;
      

    @

    1. In the "winbase.h" file, I add this definetions.
      @
      #define CBR_691200 691200
      #define CBR_921600 921600
      @

    Is this the correct way to do it? and how can I check it?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.