2N TELEKOMUNIKACE a.s., www.2n.cz
9/42
3.3 API Functions
The API functions are encased in the Java class android.hardware.IndoorTouch. All the
methods are static and require no class instance. API is divided into:
3.3.1 LEDs
The LED notification interface has been designed both for GPIO and PWM LED
control. Notifications are executed by so-called effects. The effect is a vector of
brightness transitions for each defined LED colour with a defined transition time. With
GPIO LEDs, intensity is thresholded for the on/off value. The library contains some pre-
defined effects and the user can define additional effects of its own.
3.3.1.7 Display Backlight Notification
3.3.1.1 Effect Adding
int
IndoorTouch.LedsAddEffect(String effectName,
int
continuity, String
transitions,
int
effectLedMask,
int
usedLedMask);
1. The argument specifies the effect name. If the effect exists, RC_ERR_EXIST is
returned.
2.
The
argument
can
have
the
following
values:
LED_EFFECT_CONTINUITY_SINGLE, LED_EFFECT_CONTINUITY_REPEATING,
LED_EFFECT_CONTINUITY_KEEP. These values define what happens when the
transition vector ends. With SINGLE, the effect is terminated and removed from
the active effect database. With REPEATING, the effect starts from the
beginning again. With KEEP, the effect remains active displaying the last final
transition value.