Skip to main content

Class MikroBusConnector

Represents a connector for MikroBus devices

Assembly: Meadow.Contracts.dll
View Source
Declaration
public class MikroBusConnector : Connector<MikroBusConnector.MikroBusPinDefinitions>, IConnector, IIOController<MikroBusConnector.MikroBusPinDefinitions>

Inheritance: System.Object -> Meadow.Hardware.Connector<TPinDefinition>

Implements:
Meadow.IConnector

Properties

SerialPortName

The serial port name

View Source
Declaration
public SerialPortName SerialPortName { get; }

I2cBus

Gets the connector's I2C bus

View Source
Declaration
public II2cBus I2cBus { get; }

SpiBus

Gets the connector's SPI bus

View Source
Declaration
public ISpiBus SpiBus { get; }

Methods

CreateSerialPort(int, int, Parity, StopBits, int)

Creates a serial port on the connector

View Source
Declaration
public ISerialPort CreateSerialPort(int baudRate = 9600, int dataBits = 8, Parity parity = Parity.None, StopBits stopBits = StopBits.One, int readBufferSize = 1024)
Returns

Meadow.Hardware.ISerialPort

Parameters
TypeNameDescription
System.Int32baudRateThe speed, in bits per second, of the serial port.
System.Int32dataBitsThe number of data bits expected in the serial message frame. Default is 8.
Meadow.Hardware.ParityparityThe Parity enum describing what type of cyclic-redundancy-check (CRC) bit, if any, should be expected in the serial message frame. Default is Parity.None.
Meadow.Hardware.StopBitsstopBitsThe StopBits describing how many bits should be expected at the end of every character in the serial message frame. Default is StopBits.One.
System.Int32readBufferSizeThe size, in bytes, of the read buffer. Default is 1024.

CreateSerialMessagePort(byte[], bool, int, int, Parity, StopBits, int)

Creates an Meadow.Hardware.ISerialMessagePort

View Source
Declaration
public ISerialMessagePort CreateSerialMessagePort(byte[] suffixDelimiter, bool preserveDelimiter, int baudRate = 9600, int dataBits = 8, Parity parity = Parity.None, StopBits stopBits = StopBits.One, int readBufferSize = 512)
Returns

Meadow.Hardware.ISerialMessagePort

Parameters
TypeNameDescription
System.Byte[]suffixDelimiter
System.BooleanpreserveDelimiter
System.Int32baudRateThe speed, in bits per second, of the serial port.
System.Int32dataBitsThe number of data bits expected in the serial message frame. Default is 8.
Meadow.Hardware.ParityparityThe Parity enum describing what type of cyclic-redundancy-check (CRC) bit, if any, should be expected in the serial message frame. Default is Parity.None.
Meadow.Hardware.StopBitsstopBitsThe StopBits describing how many bits should be expected at the end of every character in the serial message frame. Default is StopBits.One.
System.Int32readBufferSizeThe size, in bytes, of the read buffer. Default is 1024.

CreateSerialMessagePort(byte[], bool, int, int, int, Parity, StopBits, int)

Creates an Meadow.Hardware.ISerialMessagePort

View Source
Declaration
public ISerialMessagePort CreateSerialMessagePort(byte[] prefixDelimiter, bool preserveDelimiter, int messageLength, int baudRate = 9600, int dataBits = 8, Parity parity = Parity.None, StopBits stopBits = StopBits.One, int readBufferSize = 512)
Returns

Meadow.Hardware.ISerialMessagePort

Parameters
TypeNameDescription
System.Byte[]prefixDelimiter
System.BooleanpreserveDelimiter
System.Int32messageLength
System.Int32baudRateThe speed, in bits per second, of the serial port.
System.Int32dataBitsThe number of data bits expected in the serial message frame. Default is 8.
Meadow.Hardware.ParityparityThe Parity enum describing what type of cyclic-redundancy-check (CRC) bit, if any, should be expected in the serial message frame. Default is Parity.None.
Meadow.Hardware.StopBitsstopBitsThe StopBits describing how many bits should be expected at the end of every character in the serial message frame. Default is StopBits.One.
System.Int32readBufferSizeThe size, in bytes, of the read buffer. Default is 1024.

Implements