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