Go to the source code of this file.
|
ca_error | Btn_RegisterOutputExt (uint8_t ledBtn) |
| Set the functionality as output/LED. More...
|
|
ca_error | Btn_RegisterButtonInputExt (uint8_t ledBtn) |
| Set the functionality of a button to be an input. More...
|
|
ca_error | Btn_RegisterGeneralInputExt (uint8_t ledBtn) |
| Set the functionality to be a general input (no interrupt, polling only) More...
|
|
ca_error | Btn_DeRegisterExt (uint8_t ledBtn) |
| De-Register an LED or Button Pin. More...
|
|
ca_error | Btn_CheckOutputExt (uint8_t ledBtn) |
| check if valid output/LED More...
|
|
ca_error | Btn_CheckInputOrButtonExt (uint8_t ledBtn) |
| check if valid input/Button More...
|
|
bool | Btn_HasButtonExt (void) |
| Check if any button declared. More...
|
|
ca_error | Btn_SetButtonShortPressCallbackExt (uint8_t ledBtn, btn_callback callback, void *context, uint8_t shortPressMode) |
| Set a callback function to a button when it is short pressed. More...
|
|
ca_error | Btn_SetButtonLongPressCallbackExt (uint8_t ledBtn, btn_callback callback, void *context, uint32_t timeThreshold) |
| Set a callback function to a button when it is long pressed. More...
|
|
ca_error | Btn_SetButtonHoldCallbackExt (uint8_t ledBtn, btn_callback callback, void *context, uint32_t TimeInterval) |
| Set a callback function to a button when it is held. More...
|
|
ca_error | Btn_PollButtonsExt (uint8_t port) |
| Main polling function to activate callbacks for any buttons that are currently being pressed. More...
|
|
bool | Btn_CanSleepExt (void) |
| Check if all buttons have been handled. More...
|
|
◆ NUM_LEDBTN_EXT
◆ Btn_CanSleepExt()
bool Btn_CanSleepExt |
( |
void |
| ) |
|
Check if all buttons have been handled.
- Returns
- true/false
◆ Btn_CheckInputOrButtonExt()
ca_error Btn_CheckInputOrButtonExt |
( |
uint8_t |
ledBtn | ) |
|
check if valid input/Button
- Parameters
-
ionr | - I/O number |
val | - the state of the input/Button |
- Returns
- status
◆ Btn_CheckOutputExt()
ca_error Btn_CheckOutputExt |
( |
uint8_t |
ledBtn | ) |
|
check if valid output/LED
- Parameters
-
ledBtn | - reference to output/LED |
val | - the state of the output/LED |
- Returns
- status
◆ Btn_DeRegisterExt()
ca_error Btn_DeRegisterExt |
( |
uint8_t |
ledBtn | ) |
|
De-Register an LED or Button Pin.
- Parameters
-
ledBtn | - reference to LED/Button |
- Returns
- status
◆ Btn_HasButtonExt()
bool Btn_HasButtonExt |
( |
void |
| ) |
|
Check if any button declared.
- Parameters
-
values | - the state of all buttons |
- Returns
- true if any button is registered, false if not
◆ Btn_PollButtonsExt()
ca_error Btn_PollButtonsExt |
( |
uint8_t |
port | ) |
|
Main polling function to activate callbacks for any buttons that are currently being pressed.
- Parameters
-
port | - gpio values read from extender chip |
- Returns
- status
◆ Btn_RegisterButtonInputExt()
ca_error Btn_RegisterButtonInputExt |
( |
uint8_t |
ledBtn | ) |
|
Set the functionality of a button to be an input.
- Parameters
-
ledBtn | - reference to button |
- Returns
- status
◆ Btn_RegisterGeneralInputExt()
ca_error Btn_RegisterGeneralInputExt |
( |
uint8_t |
ledBtn | ) |
|
Set the functionality to be a general input (no interrupt, polling only)
- Parameters
-
ledBtn | - reference number to input |
- Returns
- status
◆ Btn_RegisterOutputExt()
ca_error Btn_RegisterOutputExt |
( |
uint8_t |
ledBtn | ) |
|
Set the functionality as output/LED.
- Parameters
-
ledBtn | - reference to output/LED |
- Returns
- status
◆ Btn_SetButtonHoldCallbackExt()
ca_error Btn_SetButtonHoldCallbackExt |
( |
uint8_t |
ledBtn, |
|
|
btn_callback |
callback, |
|
|
void * |
context, |
|
|
uint32_t |
TimeInterval |
|
) |
| |
Set a callback function to a button when it is held.
- Parameters
-
ledBtn | - reference to button |
callback | - function to call |
context | - context for the callback, should be set to NULL if not context is needed. |
TimeInterval | - time interval in [ms] in which callback function is called |
- Returns
- status
◆ Btn_SetButtonLongPressCallbackExt()
ca_error Btn_SetButtonLongPressCallbackExt |
( |
uint8_t |
ledBtn, |
|
|
btn_callback |
callback, |
|
|
void * |
context, |
|
|
uint32_t |
timeThreshold |
|
) |
| |
Set a callback function to a button when it is long pressed.
- Parameters
-
ledBtn | - reference to button |
callback | - function to call |
context | - context for the callback, should be set to NULL if not context is needed. |
timeThreshold | - time above which a button press is considered a long press |
- Returns
- status
◆ Btn_SetButtonShortPressCallbackExt()
ca_error Btn_SetButtonShortPressCallbackExt |
( |
uint8_t |
ledBtn, |
|
|
btn_callback |
callback, |
|
|
void * |
context, |
|
|
uint8_t |
shortPressMode |
|
) |
| |
Set a callback function to a button when it is short pressed.
- Parameters
-
ledBtn | - reference to button |
callback | - function to call |
context | - context for the callback, should be set to NULL if no context is needed. |
shortPressMode | - short press mode (when pressed or when released). |
- Returns
- status