Search code examples
c++baud-rate

How to Set Baud Rate 28800 Using DCB Structure


Previously I was using CBR_9600 when communicating with 9600 baud devices. But there does not seem to be a CBR_28800 setting. Is it possible to set the baud rate using the DCB structure of 28800?


Solution

  • According to MSDN, the baud rate can either be one of the defined constants (such as CBR_9600, CBR_38400, etc) or any integer value. The constants are just defined to the values, so it's not really an enumeration at all. From the link:

    The baud rate at which the communications device operates. This member can be an actual baud rate value, or one of the following indexes.