bsp_btn_ant.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved.
  2. *
  3. * The information contained herein is property of Nordic Semiconductor ASA.
  4. * Terms and conditions of usage are described in detail in NORDIC
  5. * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
  6. *
  7. * Licensees are granted free, non-transferable use of the information. NO
  8. * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
  9. * the file.
  10. *
  11. */
  12. /**@file
  13. *
  14. * @defgroup bsp_btn_ant BSP: ANT Button Module
  15. * @{
  16. * @ingroup bsp
  17. *
  18. * @brief Module for controlling ANT behavior through button actions.
  19. *
  20. * @details The application must propagate ANT events to the ANT Button Module.
  21. * Based on these events, the ANT Button Module configures the Board Support Package
  22. * to generate BSP events for certain button actions. These BSP events should then be
  23. * handled by the application's BSP event handler.
  24. *
  25. */
  26. #ifndef BSP_BTN_ANT_H__
  27. #define BSP_BTN_ANT_H__
  28. #include <stdint.h>
  29. #include "ant_stack_handler_types.h"
  30. /**@brief Function for initializing the ANT Button Module.
  31. *
  32. * Before calling this function, the BSP module must be initialized with buttons.
  33. *
  34. * @retval NRF_SUCCESS If initialization was successful. Otherwise, a propagated error code is
  35. * returned.
  36. */
  37. uint32_t bsp_btn_ant_init(void);
  38. /**@brief Function for setting up wakeup buttons before going into sleep mode.
  39. *
  40. * @retval NRF_SUCCESS If the buttons were prepared successfully. Otherwise, a propagated error
  41. * code is returned.
  42. */
  43. uint32_t bsp_btn_ant_sleep_mode_prepare(void);
  44. /**@brief Function for handling the application's ANT stack events.
  45. *
  46. * @details This function handles all events from the ANT stack that are of interest to this module.
  47. *
  48. * @param[in] p_ant_evt ANT stack event.
  49. */
  50. void bsp_btn_ant_on_ant_evt(ant_evt_t * p_ant_evt);
  51. #endif /* BSP_BTN_ANT_H__ */
  52. /** @} */