96 references to Interop
System.IO.Ports (96)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\LibraryImports.g.cs (14)
49
internal static partial int TermiosGetSignal(global::System.IO.Ports.SafeSerialDeviceHandle handle, global::
Interop
.Termios.Signals signal)
79
static extern unsafe int __PInvoke(nint __handle_native, global::
Interop
.Termios.Signals __signal_native);
90
internal static partial int TermiosGetSignal(global::System.IO.Ports.SafeSerialDeviceHandle handle, global::
Interop
.Termios.Signals signal, int @set)
120
static extern unsafe int __PInvoke(nint __handle_native, global::
Interop
.Termios.Signals __signal_native, int __set_native);
131
internal static partial global::
Interop
.Termios.Signals TermiosGetAllSignals(global::System.IO.Ports.SafeSerialDeviceHandle handle)
136
global::
Interop
.Termios.Signals __retVal = default;
157
static extern unsafe global::
Interop
.Termios.Signals __PInvoke(nint __handle_native);
293
internal static partial int TermiosDiscard(global::System.IO.Ports.SafeSerialDeviceHandle handle, global::
Interop
.Termios.Queue input)
323
static extern unsafe int __PInvoke(nint __handle_native, global::
Interop
.Termios.Queue __input_native);
495
internal static extern partial global::
Interop
.Error Shutdown(nint socket, global::System.Net.Sockets.SocketShutdown how);
585
private static unsafe extern partial global::
Interop
.Error Poll(global::
Interop
.PollEvent* pollEvents, uint eventCount, int timeout, uint* triggered);
593
internal static extern partial global::
Interop
.Error ConvertErrorPlatformToPal(int platformErrno);
601
internal static extern partial int ConvertErrorPalToPlatform(global::
Interop
.Error error);
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (6)
124
_error =
Interop
.Sys.ConvertErrorPlatformToPal(errno);
141
get { return _rawErrno == -1 ? (_rawErrno =
Interop
.Sys.ConvertErrorPalToPlatform(_error)) : _rawErrno; }
146
return
Interop
.Sys.StrError(RawErrno);
220
public static
Interop
.ErrorInfo Info(this
Interop
.Error error)
222
return new
Interop
.ErrorInfo(error);
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (4)
16
throw
Interop
.GetExceptionForIoErrno(errorInfo, path, isDirError);
21
if (error !=
Interop
.Error.SUCCESS)
99
Exception e =
Interop
.GetExceptionForIoErrno(Sys.GetLastErrorInfo(), path, isDirError);
183
internal static Exception GetIOException(
Interop
.ErrorInfo errorInfo, string? path = null)
System\IO\Ports\SafeSerialDeviceHandle.Unix.cs (6)
22
SafeSerialDeviceHandle handle =
Interop
.Serial.SerialPortOpen(portName);
31
Interop
.GetIOException(
Interop
.Sys.GetLastErrorInfo()));
39
Interop
.Serial.Shutdown(handle, SocketShutdown.Both);
40
int result =
Interop
.Serial.SerialPortClose(handle);
42
Debug.Assert(result == 0, $"Close failed with result {result} and error {
Interop
.Sys.GetLastErrorInfo()}");
System\IO\Ports\SerialStream.Unix.cs (66)
13
using Signals =
Interop
.Termios.Signals;
134
return
Interop
.Termios.TermiosGetSpeed(_handle!);
142
if (
Interop
.Termios.TermiosSetSpeed(_handle!, value) < 0)
161
Interop
.Termios.TermiosSendBreak(_handle!, 0);
169
get { return
Interop
.Termios.TermiosGetAvailableBytes(_handle!, false); }
174
get { return
Interop
.Termios.TermiosGetAvailableBytes(_handle!, true); }
181
int status =
Interop
.Termios.TermiosGetSignal(_handle!,
Interop
.Termios.Signals.SignalDcd);
195
int status =
Interop
.Termios.TermiosGetSignal(_handle!,
Interop
.Termios.Signals.SignalCts);
209
int status =
Interop
.Termios.TermiosGetSignal(_handle!,
Interop
.Termios.Signals.SignalDsr);
223
int status =
Interop
.Termios.TermiosGetSignal(_handle!,
Interop
.Termios.Signals.SignalDtr);
234
if (
Interop
.Termios.TermiosGetSignal(_handle!,
Interop
.Termios.Signals.SignalDtr, value ? 1 : 0) != 0)
243
int status =
Interop
.Termios.TermiosGetSignal(_handle!,
Interop
.Termios.Signals.SignalRts);
267
if (
Interop
.Termios.TermiosGetSignal(_handle!,
Interop
.Termios.Signals.SignalRts, value ? 1 : 0) != 0)
283
if (
Interop
.Termios.TermiosReset(_handle!, _baudRate, _dataBits, _stopBits, _parity, value) != 0)
300
if (
Interop
.Termios.TermiosReset(_handle!, _baudRate, value, _stopBits, _parity, _handshake) != 0)
318
if (
Interop
.Termios.TermiosReset(_handle!, _baudRate, _dataBits, _stopBits, value, _handshake) != 0)
335
if (
Interop
.Termios.TermiosReset(_handle!, _baudRate, _dataBits, value, _parity, _handshake) != 0)
373
Interop
.Termios.TermiosDiscard(_handle!,
Interop
.Termios.Queue.ReceiveQueue);
380
Interop
.Termios.TermiosDiscard(_handle!,
Interop
.Termios.Queue.SendQueue);
410
Interop
.Termios.TermiosDrain(_handle!);
530
private
Interop
.PollEvents PollEvents(int timeout, bool pollReadEvents, bool pollWriteEvents, out
Interop
.ErrorInfo? error)
538
Interop
.PollEvents eventsToPoll =
Interop
.PollEvents.POLLERR;
542
eventsToPoll |=
Interop
.PollEvents.POLLIN;
547
eventsToPoll |=
Interop
.PollEvents.POLLOUT;
550
Interop
.PollEvents events;
551
Interop
.Error ret =
Interop
.Serial.Poll(
557
error = ret !=
Interop
.Error.SUCCESS ?
Interop
.Sys.GetLastErrorInfo() : (
Interop
.ErrorInfo?)null;
623
if (
Interop
.Termios.TermiosReset(_handle!, _baudRate, _dataBits, _stopBits, _parity, _handshake) != 0)
693
private void FinishPendingIORequests(
Interop
.ErrorInfo? error = null)
700
Interop
.GetIOException(error.Value) :
710
Interop
.GetIOException(error.Value) :
786
int numBytes =
Interop
.Serial.Read(_handle!, bufPtr, buff.Length);
790
Interop
.ErrorInfo lastError =
Interop
.Sys.GetLastErrorInfo();
793
if (lastError.Error !=
Interop
.Error.EWOULDBLOCK)
795
readRequest.Complete(
Interop
.GetIOException(lastError));
819
int numBytes =
Interop
.Serial.Write(_handle!, bufPtr, buff.Length);
823
Interop
.ErrorInfo lastError =
Interop
.Sys.GetLastErrorInfo();
827
if (lastError.Error !=
Interop
.Error.SUCCESS && lastError.Error !=
Interop
.Error.EWOULDBLOCK)
829
r!.Complete(
Interop
.GetIOException(lastError));
896
Signals lastSignals = _pinChanged != null ?
Interop
.Termios.TermiosGetAllSignals(_handle!) : Signals.Error;
951
Interop
.PollEvents events = PollEvents(1,
954
out
Interop
.ErrorInfo? error);
962
if (events.HasFlag(
Interop
.PollEvents.POLLNVAL) ||
963
events.HasFlag(
Interop
.PollEvents.POLLERR))
970
if (events.HasFlag(
Interop
.PollEvents.POLLIN))
976
if (events.HasFlag(
Interop
.PollEvents.POLLOUT))
998
Signals current =
Interop
.Termios.TermiosGetAllSignals(_handle!);
1076
return
Interop
.GetIOException(
Interop
.Sys.GetLastErrorInfo());