Class SpiClockConfiguration
Encapsulates properties of a SPI Bus Clock
Assembly: Meadow.Contracts.dll
View Source
public class SpiClockConfiguration
Properties
Polarity
Gets or sets the current Polarity of the SPI bus clock
View Source
public SpiClockConfiguration.ClockPolarity Polarity { get; set; }
Phase
Gets or sets the current Phase of the SPI bus clock
View Source
public SpiClockConfiguration.ClockPhase Phase { get; set; }
Speed
Sets the desired speed or gets the actual speed of the SPI bus clock.
View Source
public Frequency Speed { get; set; }
BitsPerWord
Gets or sets the number of bits per word
View Source
public int BitsPerWord { get; set; }
SpiMode
Gets or sets the SPI mode
View Source
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
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
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
public event EventHandler Changed
Event Type
System.EventHandler