|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.motorola.oem.hapi.Gpio com.motorola.oem.hapi.GpioInput
public final class GpioInput
GpioInput enables configuring each available gpio in the system as an input one.In order to enable interrupt notifications on a GpioInput object, the developer should call
enableInterrupt(com.motorola.oem.hapi.GpioInterruptConfig)
with GpioInterruptConfig
object (which holds all interrupt
relevant data) as a parameter.enableCounter(com.motorola.oem.hapi.GpioCounterConfig)
with GpioCounterConfig
object
as a parameter.
Constructor Summary | |
---|---|
GpioInput(int gpioNum)
Constructs a GpioInput object and configures the specified gpioNum as input. |
Method Summary | |
---|---|
void |
disableCounter()
Disables GpioCounter . |
void |
disableInterrupt()
Disables GpioInterrupt. |
void |
enableCounter(GpioCounterConfig counter)
Enables counter by using GpioCounterConfig parameter to access predefined counter configuration. |
void |
enableInterrupt(GpioInterruptConfig interrupt)
Enables interrupt by using GpioInterruptConfig parameter to access predefined interrupt configuration. |
boolean |
isCounterEnable()
Get Gpio counter status (enabled/disabled). |
boolean |
isInterruptEnable()
Get Gpio interrupt status (enabled/disabled). |
boolean |
read()
Reads GPIO's value. |
Methods inherited from class com.motorola.oem.hapi.Gpio |
---|
clear, getNumber |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GpioInput(int gpioNum) throws GpioException
gpioNum
- The Gpio to be configured
GpioException
- Failed to configure gpio. Error code - OEMException.GENERAL_ERROR
Method Detail |
---|
public boolean read() throws GpioException
GpioException
- Gpio is not configured properly. Error code - OEMException.CONFIGURATION_ERROR
public void enableInterrupt(GpioInterruptConfig interrupt) throws GpioException
disableInterrupt()
and only
then enable interrupt with the new GpioInterruptConfig
.
interrupt
- GpioInterruptConfig holding interrupt relevant data
GpioException
- Device failed to enable interrupt. Error code - OEMException.GENERAL_ERROR
.
Calling enableInterrupt with an illegal parameter. Error code - OEMException.ILLEGAL_PARAM_ERROR
public void enableCounter(GpioCounterConfig counter) throws GpioException
disableCounter()
and only
then enable counter with the new GpioCounterConfig
.
counter
- GpioCounterConfig holding counter relevant data
GpioException
- Device failed to enable counter. Error code - OEMException.GENERAL_ERROR
Calling enableCounter with an illegal parameter. Error code - OEMException.ILLEGAL_PARAM_ERROR
public void disableInterrupt() throws GpioException
GpioException
- Gpio is not registered. Error code - OEMException.GENERAL_ERROR
enableInterrupt(com.motorola.oem.hapi.GpioInterruptConfig)
public void disableCounter() throws GpioException
GpioException
- Gpio is not registered. Error code - OEMException.GENERAL_ERROR
enableCounter(com.motorola.oem.hapi.GpioCounterConfig)
public boolean isInterruptEnable()
public boolean isCounterEnable()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |