nrf_drv_gpiote.h 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. /**
  2. * Copyright (c) 2015 - 2018, Nordic Semiconductor ASA
  3. *
  4. * All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without modification,
  7. * are permitted provided that the following conditions are met:
  8. *
  9. * 1. Redistributions of source code must retain the above copyright notice, this
  10. * list of conditions and the following disclaimer.
  11. *
  12. * 2. Redistributions in binary form, except as embedded into a Nordic
  13. * Semiconductor ASA integrated circuit in a product or a software update for
  14. * such product, must reproduce the above copyright notice, this list of
  15. * conditions and the following disclaimer in the documentation and/or other
  16. * materials provided with the distribution.
  17. *
  18. * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
  19. * contributors may be used to endorse or promote products derived from this
  20. * software without specific prior written permission.
  21. *
  22. * 4. This software, with or without modification, must only be used with a
  23. * Nordic Semiconductor ASA integrated circuit.
  24. *
  25. * 5. Any software provided in binary form under this license must not be reverse
  26. * engineered, decompiled, modified and/or disassembled.
  27. *
  28. * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
  29. * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  30. * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
  31. * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
  32. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  33. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  34. * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  35. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  36. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  37. * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  38. *
  39. */
  40. #ifndef NRF_DRV_GPIOTE_H__
  41. #define NRF_DRV_GPIOTE_H__
  42. #include <nrfx_gpiote.h>
  43. #ifdef __cplusplus
  44. extern "C" {
  45. #endif
  46. /**
  47. * @defgroup nrf_drv_gpiote GPIOTE driver - legacy layer
  48. * @{
  49. * @ingroup nrf_gpiote
  50. * @brief Layer providing compatibility with the former API.
  51. */
  52. /** @brief Type definition for forwarding the new implementation. */
  53. typedef nrfx_gpiote_in_config_t nrf_drv_gpiote_in_config_t;
  54. /** @brief Type definition for forwarding the new implementation. */
  55. typedef nrfx_gpiote_pin_t nrf_drv_gpiote_pin_t;
  56. /** @brief Type definition for forwarding the new implementation. */
  57. typedef nrfx_gpiote_out_config_t nrf_drv_gpiote_out_config_t;
  58. /** @brief Type definition for forwarding the new implementation. */
  59. typedef nrfx_gpiote_evt_handler_t nrf_drv_gpiote_evt_handler_t;
  60. /** @brief Macro for forwarding the new implementation. */
  61. #define GPIOTE_CONFIG_IN_SENSE_LOTOHI NRFX_GPIOTE_CONFIG_IN_SENSE_LOTOHI
  62. /** @brief Macro for forwarding the new implementation. */
  63. #define GPIOTE_CONFIG_IN_SENSE_HITOLO NRFX_GPIOTE_CONFIG_IN_SENSE_HITOLO
  64. /** @brief Macro for forwarding the new implementation. */
  65. #define GPIOTE_CONFIG_IN_SENSE_TOGGLE NRFX_GPIOTE_CONFIG_IN_SENSE_TOGGLE
  66. /** @brief Macro for forwarding the new implementation. */
  67. #define GPIOTE_RAW_CONFIG_IN_SENSE_LOTOHI NRFX_GPIOTE_RAW_CONFIG_IN_SENSE_LOTOHI
  68. /** @brief Macro for forwarding the new implementation. */
  69. #define GPIOTE_RAW_CONFIG_IN_SENSE_HITOLO NRFX_GPIOTE_RAW_CONFIG_IN_SENSE_HITOLO
  70. /** @brief Macro for forwarding the new implementation. */
  71. #define GPIOTE_RAW_CONFIG_IN_SENSE_TOGGLE NRFX_GPIOTE_RAW_CONFIG_IN_SENSE_TOGGLE
  72. /** @brief Macro for forwarding the new implementation. */
  73. #define GPIOTE_CONFIG_OUT_SIMPLE NRFX_GPIOTE_CONFIG_OUT_SIMPLE
  74. /** @brief Macro for forwarding the new implementation. */
  75. #define GPIOTE_CONFIG_OUT_TASK_LOW NRFX_GPIOTE_CONFIG_OUT_TASK_LOW
  76. /** @brief Macro for forwarding the new implementation. */
  77. #define GPIOTE_CONFIG_OUT_TASK_HIGH NRFX_GPIOTE_CONFIG_OUT_TASK_HIGH
  78. /** @brief Macro for forwarding the new implementation. */
  79. #define GPIOTE_CONFIG_OUT_TASK_TOGGLE NRFX_GPIOTE_CONFIG_OUT_TASK_TOGGLE
  80. /** @brief Macro for forwarding the new implementation. */
  81. #define nrf_drv_gpiote_init nrfx_gpiote_init
  82. /** @brief Macro for forwarding the new implementation. */
  83. #define nrf_drv_gpiote_is_init nrfx_gpiote_is_init
  84. /** @brief Macro for forwarding the new implementation. */
  85. #define nrf_drv_gpiote_uninit nrfx_gpiote_uninit
  86. /** @brief Macro for forwarding the new implementation. */
  87. #define nrf_drv_gpiote_out_init nrfx_gpiote_out_init
  88. /** @brief Macro for forwarding the new implementation. */
  89. #define nrf_drv_gpiote_out_uninit nrfx_gpiote_out_uninit
  90. /** @brief Macro for forwarding the new implementation. */
  91. #define nrf_drv_gpiote_out_set nrfx_gpiote_out_set
  92. /** @brief Macro for forwarding the new implementation. */
  93. #define nrf_drv_gpiote_out_clear nrfx_gpiote_out_clear
  94. /** @brief Macro for forwarding the new implementation. */
  95. #define nrf_drv_gpiote_out_toggle nrfx_gpiote_out_toggle
  96. /** @brief Macro for forwarding the new implementation. */
  97. #define nrf_drv_gpiote_out_task_enable nrfx_gpiote_out_task_enable
  98. /** @brief Macro for forwarding the new implementation. */
  99. #define nrf_drv_gpiote_out_task_disable nrfx_gpiote_out_task_disable
  100. /** @brief Macro for forwarding the new implementation. */
  101. #define nrf_drv_gpiote_out_task_addr_get nrfx_gpiote_out_task_addr_get
  102. /** @brief Macro for forwarding the new implementation. */
  103. #define nrf_drv_gpiote_in_init nrfx_gpiote_in_init
  104. /** @brief Macro for forwarding the new implementation. */
  105. #define nrf_drv_gpiote_in_uninit nrfx_gpiote_in_uninit
  106. /** @brief Macro for forwarding the new implementation. */
  107. #define nrf_drv_gpiote_in_event_enable nrfx_gpiote_in_event_enable
  108. /** @brief Macro for forwarding the new implementation. */
  109. #define nrf_drv_gpiote_in_event_disable nrfx_gpiote_in_event_disable
  110. /** @brief Macro for forwarding the new implementation. */
  111. #define nrf_drv_gpiote_in_is_set nrfx_gpiote_in_is_set
  112. /** @brief Macro for forwarding the new implementation. */
  113. #define nrf_drv_gpiote_in_event_addr_get nrfx_gpiote_in_event_addr_get
  114. /** @brief Macro for forwarding the new implementation. */
  115. #define nrf_drv_gpiote_set_task_addr_get nrfx_gpiote_set_task_addr_get
  116. /** @brief Macro for forwarding the new implementation. */
  117. #define nrf_drv_gpiote_clr_task_addr_get nrfx_gpiote_clr_task_addr_get
  118. /** @brief Macro for forwarding the new implementation. */
  119. #define nrf_drv_gpiote_out_task_force nrfx_gpiote_out_task_force
  120. /** @brief Macro for forwarding the new implementation. */
  121. #define nrf_drv_gpiote_out_task_trigger nrfx_gpiote_out_task_trigger
  122. /** @brief Macro for forwarding the new implementation. */
  123. #define nrf_drv_gpiote_set_task_trigger nrfx_gpiote_set_task_trigger
  124. /** @brief Macro for forwarding the new implementation. */
  125. #define nrf_drv_gpiote_clr_task_trigger nrfx_gpiote_clr_task_trigger
  126. /** @} */
  127. #ifdef __cplusplus
  128. }
  129. #endif
  130. #endif //NRF_DRV_GPIOTE_H__