Skip to main content

Class F7SerialPort

Represents a serial port on STM32F7 devices

Assembly: Meadow.F7.dll​
View Source​
Declaration
public class F7SerialPort : SerialPortBase, ISerialPort, IDisposable

Inheritance: System.Object -> Meadow.Hardware.SerialPortBase

Implements:
Meadow.Hardware.ISerialPort, System.IDisposable

Methods​

GetPortNames()​

Gets an array of serial port names for the current device.

View Source​
Declaration
public static string[] GetPortNames()
Returns​

System.String[]

OpenHardwarePort(string)​

Opens the OS hardware port

View Source​
Declaration
protected override IntPtr OpenHardwarePort(string portName)
Returns​

System.IntPtr

Parameters​
TypeName
System.StringportName
Exceptions​

Meadow.NativeException

CloseHardwarePort(IntPtr)​

Closes the OS hardware port

View Source​
Declaration
protected override void CloseHardwarePort(IntPtr handle)
Parameters​
TypeName
System.IntPtrhandle

WriteHardwarePort(IntPtr, byte[], int)​

Writes data to the OS hardware port

View Source​
Declaration
protected override int WriteHardwarePort(IntPtr handle, byte[] data, int count)
Returns​

System.Int32

Parameters​
TypeName
System.IntPtrhandle
System.Byte[]data
System.Int32count
Exceptions​

Meadow.NativeException

ReadHardwarePort(IntPtr, byte[], int)​

Reads data from the OS hardware port

View Source​
Declaration
protected override int ReadHardwarePort(IntPtr handle, byte[] readBuffer, int count)
Returns​

System.Int32

Parameters​
TypeName
System.IntPtrhandle
System.Byte[]readBuffer
System.Int32count
Exceptions​

Meadow.NativeException

SetHardwarePortSettings(IntPtr)​

Calls the OS to set serial port settings (e.g. parity and stop bits)

View Source​
Declaration
protected override void SetHardwarePortSettings(IntPtr handle)
Parameters​
TypeName
System.IntPtrhandle
Exceptions​

Meadow.NativeException

Implements​