Interface: moteiv.tos.interfaces.ButtonAdvanced

interface ButtonAdvanced

Advanced button handling interface for complex gestures.

Author:
Joe Polastre, Moteiv Corporation <info@moteiv.com>

Commands
command void disable() Disable advanced button processing.
command void enable() Enable advanced button processing.
command uint16_t getLongPress() Get the time requested for a long button press.
command void setLongPress(uint16_t time) Request events when a long press occurs.

Events
event void longClick(uint32_t time) Notification that a long click occurred.
event void multiClick(uint8_t count) Notification that multiple clicks occurred.

Commands - Details

disable

command void disable()

Disable advanced button processing.

enable

command void enable()

Enable advanced button processing.

getLongPress

command uint16_t getLongPress()

Get the time requested for a long button press.

Returns:
time the time required for a long press in milliseconds

setLongPress

command void setLongPress(uint16_t time)

Request events when a long press occurs.

Parameters:
time - the number of milliseconds in duration for a button press

Events - Details

longClick

event void longClick(uint32_t time)

Notification that a long click occurred.

Parameters:
time - The time that the long click started

multiClick

event void multiClick(uint8_t count)

Notification that multiple clicks occurred.

Parameters:
count - Number of clicks in the multi click event