Property | Type | Description | |
---|---|---|---|
_nonVolMode | MicrochipPotNonVolatileMode |
Method | Description | |
---|---|---|
Decrease ( ) : void |
Decreases the wiper's value by one step. It is not an error if the wiper already hit the lower boundary (0). In this situation, the wiper doesn't change.
|
|
Decrease ( |
Decreases the wiper's value by the specified number of steps. It is not an error if the wiper hits or already hit the lower boundary (0). In such situations, the wiper sticks to the lower boundary or doesn't change.
|
|
Dispose ( ) : void |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Call Dispose when you are finished using the CyrusBuilt.MonoPi.Components.Potentiometers.Microchip.MicrochipPotentiometerBase. The Dispose method leaves the CyrusBuilt.MonoPi.Components.Potentiometers.Microchip.MicrochipPotentiometerBase in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.Components.Potentiometers.Microchip.MicrochipPotentiometerBase so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.Components.Potentiometers.Microchip.MicrochipPotentiometerBase was occupying. |
|
Increase ( ) : void |
Increase the wiper's value by one step. It is not an error if the wiper already hit the upper boundary. In this situation, the wiper doesn't change.
|
|
Increase ( |
Increases the wiper's value by the specified number of steps. It is not an error if the wiper hits or already hit the upper boundary. In such situations, the wiper sticks to the upper boundary or doesn't change.
|
|
IsChannelSupported ( MicrochipPotChannel channel ) : System.Boolean |
Determines whether or not the specified channel is supported by the underlying device.
|
|
SetWiperLock ( System.Boolean enabled ) : void |
Enables or disables the wiper lock.
|
|
SetWriteProtection ( System.Boolean enabled ) : void |
Enables or disables write-protection for devices capable of non-volatile memory. Enabling write-protection does not only protect non-volatile wipers, it also protects any other non-volatile information stored (i.e. wiper-locks).
|
|
UpdateCacheFromDevice ( ) : |
Updates the cache to the wiper's value.
|
Method | Description | |
---|---|---|
BuildI2CAddress ( System.Boolean pinA0, System.Boolean pinA1, System.Boolean pinA2 ) : |
Builds the I2C bus address of the device based on which which address pins are set.
|
|
GetNonVolatileValue ( ) : |
Gets the non-volatile wiper's value. The visibility of this method is protected because not all devices support non-volatile wipers. Any derived class may publish this method. |
|
Initialize ( |
Initializes the wiper to a defined status. For devices capable of non-volatile wipers, the non-volatile value is loaded. For devices not capable, the given value is set in the device.
|
|
MicrochipPotentiometerBase ( II2CBus device, System.Boolean pinA0, System.Boolean pinA1, System.Boolean pinA2, MicrochipPotChannel channel, MicrochipPotNonVolatileMode nonVolatileMode, |
Initializes a new instance of the CyrusBuilt.MonoPi.Components.Potentiometers.Microchip.MicrochipPotentiometerBase class with the I2C device connection, pin A0,A1, and A2 states, the potentiometer (channel) provided by the device, how to do non-volatile I/O and the initial value for devices which are not capable of non-volatile wipers.
|
|
SetNonVolatileMode ( MicrochipPotNonVolatileMode mode ) : void |
Sets the non-volatility mode. The visibility of this method is protected because not all devices support non-volatile wipers. Any derived class may publish this method. |
Method | Description | |
---|---|---|
GetValueAccordingBoundaries ( |
Adjusts the given value according to the boundaries (0 and CyrusBuilt.MonoPi.Components.Potentiometers.Microchip.MicrochipPotentiometerBase.MaxValue).
|
|
MicrochipPotentiometerBase_WiperActionEvent ( object sender, WiperEventArgs e ) : void |
The potentiometer base wiper action event handler. This sets the channel value for either volatile or non-volatile wipers (depending on volatilty mode).
|
|
OnWiperActionEvent ( WiperEventArgs e ) : void |
Raises the wiper action event event.
|
protected static BuildI2CAddress ( System.Boolean pinA0, System.Boolean pinA1, System.Boolean pinA2 ) : |
||
pinA0 | System.Boolean | /// Whether the device's address pin A0 is high (true) or low (false). /// |
pinA1 | System.Boolean | /// Whether the device's address pin A1 (if available) is high (true) or low (false). /// |
pinA2 | System.Boolean | /// Whether the device's address pin A2 (if available) is high (true) or low (false). /// |
return |
public Decrease ( |
||
steps | /// The number of steps to decrease by. /// | |
return | void |
protected GetNonVolatileValue ( ) : |
||
return |
public Increase ( |
||
steps | /// How many steps to increase. /// | |
return | void |
protected Initialize ( |
||
initialValForNonVolWipers | /// The initial value for devices not capable of non-volatile wipers. /// | |
return | void |
public IsChannelSupported ( MicrochipPotChannel channel ) : System.Boolean | ||
channel | MicrochipPotChannel | /// The channel to check. /// |
return | System.Boolean |
protected MicrochipPotentiometerBase ( II2CBus device, System.Boolean pinA0, System.Boolean pinA1, System.Boolean pinA2, MicrochipPotChannel channel, MicrochipPotNonVolatileMode nonVolatileMode, |
||
device | II2CBus | /// The I2C bus device this instance is connected to. /// |
pinA0 | System.Boolean | /// Whether the device's address pin A0 is high (true) or low (false). /// |
pinA1 | System.Boolean | /// Whether the device's address pin A1 is high (true) or low (false). /// |
pinA2 | System.Boolean | /// Whether the device's address pin A2 is high (true) or low (false). /// |
channel | MicrochipPotChannel | /// Which of the potentiometers provided by the device to control. /// |
nonVolatileMode | MicrochipPotNonVolatileMode | /// The way non-volatile reads or writes are done. /// |
initialNonVolWiperValue | /// The value for devices which are not capable of non-volatile wipers. /// | |
return | System |
protected SetNonVolatileMode ( MicrochipPotNonVolatileMode mode ) : void | ||
mode | MicrochipPotNonVolatileMode | /// The way non-volatile reads or writes are done. /// |
return | void |
public SetWiperLock ( System.Boolean enabled ) : void | ||
enabled | System.Boolean | /// Set true to enable. /// |
return | void |
public SetWriteProtection ( System.Boolean enabled ) : void | ||
enabled | System.Boolean | /// Set true to enable. /// |
return | void |