More migration fun

This commit is contained in:
2024-07-13 15:22:16 +02:00
parent eec290ae8f
commit a8068becba
3 changed files with 6 additions and 10 deletions
@@ -496,7 +496,7 @@ public partial class SerialPort : IDisposable
if (PInvoke.ClearCommError(_hPort, &errs, null))
{
StringBuilder s = new("UART Error: ", 40);
if (((uint)errs & Win32Com.CE_FRAME) != 0)
if (((uint)errs & (uint)CLEAR_COMM_ERROR_FLAGS.CE_FRAME) != 0)
{
s = s.Append("Framing,");
}
@@ -506,17 +506,17 @@ public partial class SerialPort : IDisposable
s = s.Append("IO,");
}
if (((uint)errs & Win32Com.CE_OVERRUN) != 0)
if (((uint)errs & (uint)CLEAR_COMM_ERROR_FLAGS.CE_OVERRUN) != 0)
{
s = s.Append("Overrun,");
}
if (((uint)errs & Win32Com.CE_RXOVER) != 0)
if (((uint)errs & (uint)CLEAR_COMM_ERROR_FLAGS.CE_RXOVER) != 0)
{
s = s.Append("Receive Overflow,");
}
if (((uint)errs & Win32Com.CE_RXPARITY) != 0)
if (((uint)errs & (uint)CLEAR_COMM_ERROR_FLAGS.CE_RXPARITY) != 0)
{
s = s.Append("Parity,");
}