Functions which handle the buttons. More...
Modules | |
Advanced informations | |
Enumerations | |
enum | eButtonMask |
clusters bit masks for reading the buttons More... | |
Functions | |
eButtonMask | buttons_wait (eButtonMask bitmask) |
Returns the last pushed and released button. More... | |
Request Funktions | |
void | buttons_request (eRequestType request) |
Requests new data from the buttons. More... | |
uint8_t | buttons_received (void) |
Indicates if new data for the data block sButton was received. More... | |
uint8_t | buttons_changed (void) |
Indicates if new data changed the data block sButton. More... | |
Access Funktions | |
eButtonMask | buttons_get (eButtonMask bitmask) |
Returns the last stored value of the selected buttons. More... | |
Functions which handle the buttons.
example
enum eButtonMask |
clusters bit masks for reading the buttons
This enum is used for masking the buttons in buttons_get() and for storing that functions' result as a bitfield.
uint8_t buttons_changed | ( | void | ) |
Indicates if new data changed the data block sButton.
The return value is boolean.
eButtonMask buttons_get | ( | eButtonMask | bitmask | ) |
Returns the last stored value of the selected buttons.
This function relies on the internal data block sButton - for new data use buttons_request().
bitmask | bit mask of the selected buttons - see also eButtonMask The parameter is used to only return the state of the selected buttons. All other states(bits) are set to 0. |
uint8_t buttons_received | ( | void | ) |
Indicates if new data for the data block sButton was received.
The return value is boolean.
void buttons_request | ( | eRequestType | request | ) |
Requests new data from the buttons.
For details on the request schema see The general request.
Involved data blocks are:
sButton
request | See also eRequestType |
eButtonMask buttons_wait | ( | eButtonMask | bitmask | ) |
Returns the last pushed and released button.
This function will return if exactly one button was pushed and released.
This function relies on the internal data block sButton - but it will automatically request the variable itself.
bitmask | bit mask of the selected buttons - see also eButtonMask The parameter is used to select which buttons are monitored. If no button is selected the function will return kButtonNone immediately. |