MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / setBaudRate

Method setBaudRate

lib/usb/serial.cc:98–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96 }
97
98 void setBaudRate(int baudRate) override
99 {
100 DCB dcb = {.DCBlength = sizeof(DCB),
101 .BaudRate = (DWORD)baudRate,
102 .fBinary = true,
103 .ByteSize = 8,
104 .Parity = NOPARITY,
105 .StopBits = ONESTOPBIT};
106 SetCommState(_handle, &dcb);
107
108 toggleDtr();
109 }
110
111private:
112 static std::string get_last_error_string()

Callers 1

GreaseweazleUsbMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected