PebbleOS
Loading...
Searching...
No Matches
Functions
Buttons

Raw button state. More...

Functions

void button_init (void)
 Configure the button inputs.
 
void button_set_rotated (bool rotated)
 Set whether the device is rotated by 180 degrees.
 
bool button_is_pressed (ButtonId id)
 Check whether a button is pressed.
 
uint8_t button_get_state_bits (void)
 Get the state of all buttons.
 

Detailed Description

Raw button state.

Reads the button inputs directly, without debouncing; see Debounced buttons for button events.

Function Documentation

◆ button_get_state_bits()

uint8_t button_get_state_bits ( void  )

Get the state of all buttons.

Returns
Bitmask with bit n set if the button with ButtonId n is pressed.

◆ button_init()

void button_init ( void  )

Configure the button inputs.

◆ button_is_pressed()

bool button_is_pressed ( ButtonId  id)

Check whether a button is pressed.

Parameters
idButton to check.
Returns
True if pressed.

◆ button_set_rotated()

void button_set_rotated ( bool  rotated)

Set whether the device is rotated by 180 degrees.

While rotated, the up and down buttons are swapped.

Parameters
rotatedTrue if rotated by 180 degrees.