Class SpiClockConfiguration
Encapsulates properties of a SPI Bus Clock
Assembly: Meadow.Contracts.dll
View Source
Declaration
public class SpiClockConfiguration
Properties
Polarity
Gets or sets the current Polarity of the SPI bus clock
View Source
Declaration
public SpiClockConfiguration.ClockPolarity Polarity { get; set; }
Phase
Gets or sets the current Phase of the SPI bus clock
View Source
Declaration
public SpiClockConfiguration.ClockPhase Phase { get; set; }
Speed
Sets the desired speed or gets the actual speed of the SPI bus clock.
View Source
Declaration
public Frequency Speed { get; set; }
BitsPerWord
Gets or sets the number of bits per word
View Source
Declaration
public int BitsPerWord { get; set; }
SpiMode
Gets or sets the SPI mode
View Source
Declaration
public SpiClockConfiguration.Mode SpiMode { get; }
Methods
SetActualSpeed(Frequency)
Provided to allow setting speed value without raising a Changed event. This method is used internally.
View Source
Declaration
public void SetActualSpeed(Frequency speed)
Parameters
Type | Name | Description |
---|---|---|
Meadow.Units.Frequency | speed | The SPI bus speed |
SetBusMode(Mode)
Provided to allow setting the SPI bus mode
View Source
Declaration
public void SetBusMode(SpiClockConfiguration.Mode mode)
Parameters
Type | Name | Description |
---|---|---|
Meadow.Hardware.SpiClockConfiguration.Mode | mode | The SPI bus mode |
Events
Changed
Event raised when the configuration changes
View Source
Declaration
public event EventHandler Changed
Event Type
System.EventHandler