FemtoIDE Java API  v0.0.18b
femto.input.Button Class Reference

This class represents a pressable button. More...

Public Member Functions

void attach (ButtonListener listener)
 
void detach ()
 Deregisters this button's ButtonListener.
 
int intpin ()
 
boolean justPressed ()
 Returns true if the button has just transition from being released to being pressed.
 
boolean isPressed ()
 Returns true if the button is pressed.
 

Static Public Member Functions

static void _irq0_ ()
 
static void _irq1_ ()
 
static void enableInterrupts ()
 

Static Public Attributes

static final Button A = new Button(1, 9)
 The Button object representing the Pokitto's A button.
 
static final Button B = new Button(1, 4)
 The Button object representing the Pokitto's B button.
 
static final Button C = new Button(1, 10)
 The Button object representing the Pokitto's C button.
 
static final Button Flash = new Button(0, 1)
 The Button object representing the Pokitto's flash button.
 
static final Button Reset = new Button(0, 0)
 The Button object representing the Pokitto's reset button.
 
static final Button Up = new Button(1, 13)
 The Button object representing the Pokitto's up button.
 
static final Button Down = new Button(1, 3)
 The Button object representing the Pokitto's down button.
 
static final Button Left = new Button(1, 25)
 The Button object representing the Pokitto's left button.
 
static final Button Right = new Button(1, 7)
 The Button object representing the Pokitto's right button.
 

Detailed Description

This class represents a pressable button.

Member Function Documentation

◆ attach()

void femto.input.Button.attach ( ButtonListener  listener)

Registers the specified ButtonListener to this button. There can be only one ButtonListener per button.


The documentation for this class was generated from the following file: