![]() |
MAX32665 SDK Documentation
0.2
Software Development Kit Overview and API Documentation
|
Typedefs | |
| typedef void(* | pb_callback) (void *pb) |
Type alias pb_callback for the push button callback. More... | |
Functions | |
| int | PB_Init (void) |
| Initialize all push buttons. More... | |
| int | PB_RegisterCallback (unsigned int pb, pb_callback callback) |
Register or Unregister a callback handler for events on the pb push button. More... | |
| int | PB_RegisterRiseFallCallback (unsigned int pb, pb_callback callback) |
Register or Unregister a callback handler for rising and falling events on the pb push button. More... | |
| void | PB_IntEnable (unsigned int pb) |
| Enable a callback interrupt. More... | |
| void | PB_IntDisable (unsigned int pb) |
| Disable a callback interrupt. More... | |
| void | PB_IntClear (unsigned int pb) |
| Clear a callback interrupt. More... | |
| int | PB_Get (unsigned int pb) |
| Get the current state of the push button. More... | |
Variables | |
| const gpio_cfg_t | pb_pin [] |
| const unsigned int | num_pbs |
| typedef void(* pb_callback) (void *pb) |
The function is of type:
To receive notification of a push button event, define a callback function and pass it as a pointer to the PB_RegisterCallback(unsigned int pb, pb_callback callback) function.
| pb | Pointer to the push button index that triggered the callback. |
| int PB_Init | ( | void | ) |
E_NO_ERROR Push buttons initialized successfully. | int PB_RegisterCallback | ( | unsigned int | pb, |
| pb_callback | callback | ||
| ) |
callback, configures the pushbutton pb and enables the interrupt to handle the push button events.NULL pointer will disable the interrupt and unregister the callback function. pb must be a value between 0 and num_pbs.| pb | push button index to receive event callbacks. |
| callback | Callback function pointer of type pb_callback |
| int PB_RegisterRiseFallCallback | ( | unsigned int | pb, |
| pb_callback | callback | ||
| ) |
callback, configures the pushbutton pb and enables the interrupt to handle the push button events.NULL pointer will disable the interrupt and unregister the callback function. pb must be a value between 0 and num_pbs.| pb | push button index to receive event callbacks. |
| callback | Callback function pointer of type pb_callback |
| void PB_IntEnable | ( | unsigned int | pb | ) |
| pb | push button index value between 0 and num_pbs. |
| void PB_IntDisable | ( | unsigned int | pb | ) |
| pb | push button index |
| void PB_IntClear | ( | unsigned int | pb | ) |
| pb | push button index value between 0 and num_pbs. |
| int PB_Get | ( | unsigned int | pb | ) |
| pb | push button index value between 0 and num_pbs. |