public class MicrochipPotentiometerDeviceController extends Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
NONVOLATILE_WIPER |
static boolean |
VOLATILE_WIPER |
| Constructor and Description |
|---|
MicrochipPotentiometerDeviceController(I2CDevice i2cDevice)
Builds an instance which is ready to use.
|
| Modifier and Type | Method and Description |
|---|---|
void |
decrease(com.pi4j.component.potentiometer.microchip.impl.DeviceControllerChannel channel,
int steps)
Decrements the volatile wiper for the given number steps.
|
boolean |
equals(Object obj) |
com.pi4j.component.potentiometer.microchip.impl.DeviceControllerDeviceStatus |
getDeviceStatus()
Returns the status of the device according EEPROM and WiperLocks.
|
com.pi4j.component.potentiometer.microchip.impl.DeviceControllerTerminalConfiguration |
getTerminalConfiguration(com.pi4j.component.potentiometer.microchip.impl.DeviceControllerChannel channel)
Fetches the terminal-configuration from the device for a certain channel.
|
int |
getValue(com.pi4j.component.potentiometer.microchip.impl.DeviceControllerChannel channel,
boolean nonVolatile)
Receives the current wiper's value from the device.
|
void |
increase(com.pi4j.component.potentiometer.microchip.impl.DeviceControllerChannel channel,
int steps)
Increments the volatile wiper for the given number steps.
|
void |
setTerminalConfiguration(com.pi4j.component.potentiometer.microchip.impl.DeviceControllerTerminalConfiguration config)
Sets the given terminal-configuration to the device.
|
void |
setValue(com.pi4j.component.potentiometer.microchip.impl.DeviceControllerChannel channel,
int value,
boolean nonVolatile)
Sets the wiper's value in the device.
|
void |
setWiperLock(com.pi4j.component.potentiometer.microchip.impl.DeviceControllerChannel channel,
boolean locked)
Enables or disables a wiper's lock.
|
void |
setWriteProtection(boolean enabled)
Enables or disables the device's write-protection.
|
String |
toString() |
public static final boolean VOLATILE_WIPER
public static final boolean NONVOLATILE_WIPER
public MicrochipPotentiometerDeviceController(I2CDevice i2cDevice) throws IOException
i2cDevice - The Pi4J-I2CDevice to which the instance is connected toIOException - throwpublic com.pi4j.component.potentiometer.microchip.impl.DeviceControllerDeviceStatus getDeviceStatus()
throws IOException
IOException - Thrown if communication fails or device returned a malformed resultpublic void increase(com.pi4j.component.potentiometer.microchip.impl.DeviceControllerChannel channel,
int steps)
throws IOException
channel - Which wipersteps - The number of stepsIOException - Thrown if communication fails or device returned a malformed resultpublic void decrease(com.pi4j.component.potentiometer.microchip.impl.DeviceControllerChannel channel,
int steps)
throws IOException
channel - Which wipersteps - The number of stepsIOException - Thrown if communication fails or device returned a malformed resultpublic int getValue(com.pi4j.component.potentiometer.microchip.impl.DeviceControllerChannel channel,
boolean nonVolatile)
throws IOException
channel - Which wipernonVolatile - volatile or non-volatile valueIOException - Thrown if communication fails or device returned a malformed resultpublic void setValue(com.pi4j.component.potentiometer.microchip.impl.DeviceControllerChannel channel,
int value,
boolean nonVolatile)
throws IOException
channel - Which wipervalue - The wiper's valuenonVolatile - volatile or non-volatile valueIOException - Thrown if communication fails or device returned a malformed resultpublic com.pi4j.component.potentiometer.microchip.impl.DeviceControllerTerminalConfiguration getTerminalConfiguration(com.pi4j.component.potentiometer.microchip.impl.DeviceControllerChannel channel)
throws IOException
channel - The channelIOException - Thrown if communication fails or device returned a malformed resultpublic void setTerminalConfiguration(com.pi4j.component.potentiometer.microchip.impl.DeviceControllerTerminalConfiguration config)
throws IOException
config - A terminal-configuration for a certain channel.IOException - Thrown if communication fails or device returned a malformed resultpublic void setWiperLock(com.pi4j.component.potentiometer.microchip.impl.DeviceControllerChannel channel,
boolean locked)
throws IOException
Hint: This will only work using the "High Volate Command" (see 3.1).
channel - Which wiperlocked - Whether to enable the wiper's lockIOException - Thrown if communication fails or device returned a malformed resultpublic void setWriteProtection(boolean enabled)
throws IOException
Hint: This will only work using the "High Volate Command" (see 3.1).
enabled - Whether to enable write-protectionIOException - Thrown if communication fails or device returned a malformed resultCopyright © 2012–2019 Pi4J. All rights reserved.