com.motorola.oem.hapi
Class GpioCounter

java.lang.Object
  extended by com.motorola.oem.hapi.GpioCounter

public class GpioCounter
extends java.lang.Object

The class provides Gpio Counter service methods.


Constructor Summary
GpioCounter(GpioInput gpio)
          Constructs a new GpioCounter for the specified GpipInput.
 
Method Summary
 int readGpioCounterValue()
          Reads GpioCounter current value.
 int resetGpioCounter()
          Resets Gpio Counter Expiry Value member.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GpioCounter

public GpioCounter(GpioInput gpio)
Constructs a new GpioCounter for the specified GpipInput.

Parameters:
gpio - GpioInput related to this instance of GpioCounter
Method Detail

resetGpioCounter

public int resetGpioCounter()
                     throws GpioException
Resets Gpio Counter Expiry Value member.

Returns:
GpioCounter last value before reset
Throws:
GpioException - Device failed to reset counter. Error code - GpioException.RESET_COUNTER_ERROR

readGpioCounterValue

public int readGpioCounterValue()
                         throws GpioException
Reads GpioCounter current value.

Returns:
GpioCounter current value
Throws:
GpioException - Device failed to read counter. Error code - GpioException.READ_COUNTER_ERROR