Reduce the size of the AVRDriver code.

Colorize the changed parameter.
Warning reduction across all files.
This commit is contained in:
2026-02-07 14:38:35 -06:00
parent 49edca0238
commit adad03c7df
10 changed files with 583 additions and 1429 deletions

View File

@@ -37,7 +37,7 @@ bool CSerialPort::Open(LPCTSTR PortName, uint32_t BaudRate, BYTE ByteSize, BYTE
Close();
m_PortHandle = CreateFile(PortName, DesiredAccess, 0, NULL, OPEN_EXISTING, 0, 0);
if (m_PortHandle != INVALID_HANDLE_VALUE) {
DCB dcb;
DCB dcb = { 0 };
CString s;
dcb.DCBlength = sizeof(dcb);
GetCommState(m_PortHandle, &dcb);
@@ -66,7 +66,7 @@ bool CSerialPort::Open(LPCTSTR PortName, uint32_t BaudRate, BYTE ByteSize, BYTE
SetCommState(m_PortHandle, &dcb);
COMMTIMEOUTS touts;
COMMTIMEOUTS touts = { 0 };;
touts.ReadIntervalTimeout = UINT32_MAX; // This, plus the zero timeouts causes immediate return
touts.ReadTotalTimeoutMultiplier = 0;
touts.ReadTotalTimeoutConstant = 0;