|
HRI board firmware
v2.1
Microcontroller firmware of the board used during the HRI labs.
|
Driver to access a button. More...
Functions | |
| void | but_Init (void(*stateChangedCallback)(bool)) |
| Initializes the button module. More... | |
| bool | but_GetState (void) |
| Gets the current state of the user button. More... | |
Driver to access a button.
Call but_Init() first in the initialization code. Then, call but_GetState() to read the current state of the button.
It is also possible to pass a function pointer to the but_Init() function. Then, the given function will be called automatically when the button state changes (pressed or released).
| bool but_GetState | ( | void | ) |
Gets the current state of the user button.
| void but_Init | ( | void(*)(bool) | stateChangedCallback | ) |
Initializes the button module.
| stateChangedCallback | function pointer to the callback function that should be called when the button state changes. If this feature is not used, NULL can be passed instead. |
1.8.13