예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GpioPinServiceBase"/> class.
 /// </summary>
 /// <param name="pin">The pin.</param>
 protected GpioPinServiceBase(GpioPin pin)
 {
     Pin         = pin;
     IsAvailable = ResolveAvailable();
 }
 internal GpioPinInterruptService(GpioPin pin)
     : base(pin)
 {
     // placeholder;
 }
 /// <summary>
 /// Opens a software based (bit-banged) SPI channel
 /// </summary>
 /// <param name="csPin">The cs pin.</param>
 /// <param name="misoPin">The miso pin.</param>
 /// <param name="mosiPin">The mosi pin.</param>
 /// <param name="clockPin">The clock pin.</param>
 /// <returns>The SPI channel</returns>
 public SoftSpiChannel OpenSoftSpiChannel(GpioPin csPin, GpioPin misoPin, GpioPin mosiPin, GpioPin clockPin)
 => new SoftSpiChannel(csPin, misoPin, mosiPin, clockPin, 500000, SoftSpiFlags.Default);
예제 #4
0
 internal GpioPinPwmService(GpioPin pin)
     : base(pin)
 {
     // placeholder
     // TODO: Not fully implemented yet
 }
 /// <summary>
 /// Opens a software (bit-banged) serial port.
 /// </summary>
 /// <param name="receivePin">The receive pin.</param>
 /// <param name="transmitPin">The transmit pin.</param>
 /// <param name="baudRate">The baud rate.</param>
 /// <returns>The software serial port</returns>
 public SoftSerialPort OpenSoftSerialPort(GpioPin receivePin, GpioPin transmitPin, UartRate baudRate) =>
 new SoftSerialPort(receivePin, transmitPin, baudRate, 8, false);
 /// <summary>
 /// Opens a software based (bit-banged) SPI channel
 /// </summary>
 /// <param name="csPin">The cs pin.</param>
 /// <param name="misoPin">The miso pin.</param>
 /// <param name="mosiPin">The mosi pin.</param>
 /// <param name="clockPin">The clock pin.</param>
 /// <param name="baudRate">The baud rate.</param>
 /// <returns>The SPI channel</returns>
 public SoftSpiChannel OpenSoftSpiChannel(GpioPin csPin, GpioPin misoPin, GpioPin mosiPin, GpioPin clockPin, int baudRate)
 => new SoftSpiChannel(csPin, misoPin, mosiPin, clockPin, baudRate, SoftSpiFlags.Default);
 /// <summary>
 /// Opens a software (bit-banged) serial port.
 /// </summary>
 /// <param name="receivePin">The receive pin.</param>
 /// <param name="transmitPin">The transmit pin.</param>
 /// <param name="baudRate">The baud rate.</param>
 /// <param name="dataBits">The data bits.</param>
 /// <param name="invert">if set to <c>true</c> [invert].</param>
 /// <returns>The software serial port</returns>
 public SoftSerialPort OpenSoftSerialPort(GpioPin receivePin, GpioPin transmitPin, UartRate baudRate, int dataBits, bool invert) =>
 new SoftSerialPort(receivePin, transmitPin, baudRate, dataBits, invert);
 /// <summary>
 /// Opens a software based I2C bus.
 /// </summary>
 /// <param name="dataPin">The data pin.</param>
 /// <param name="clockPin">The clock pin.</param>
 /// <returns>I2C Bus Accessor</returns>
 public SoftI2cBus OpenSoftI2cBus(GpioPin dataPin, GpioPin clockPin) =>
 new SoftI2cBus(dataPin, clockPin, SoftI2cBus.DefaultBaudRate);
 /// <summary>
 /// Opens a software based I2C bus.
 /// </summary>
 /// <param name="dataPin">The data pin.</param>
 /// <param name="clockPin">The clock pin.</param>
 /// <param name="baudRate">The baud rate from 50 t 500,000 bits per second.</param>
 /// <returns>I2C Bus Accessor</returns>
 public SoftI2cBus OpenSoftI2cBus(GpioPin dataPin, GpioPin clockPin, int baudRate) =>
 new SoftI2cBus(dataPin, clockPin, baudRate);
예제 #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GpioPinAlertService"/> class.
 /// </summary>
 /// <param name="pin">The pin.</param>
 internal GpioPinAlertService(GpioPin pin)
     : base(pin)
 {
     // placeholder
 }
예제 #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GpioPinSoftPwmService"/> class.
 /// </summary>
 /// <param name="pin">The pin.</param>
 internal GpioPinSoftPwmService(GpioPin pin)
     : base(pin)
 {
     // placeholder
 }