fsl_inputmux.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /*
  2. * Copyright (c) 2016, Freescale Semiconductor, Inc.
  3. * Copyright 2016-2017 NXP
  4. * All rights reserved.
  5. *
  6. * SPDX-License-Identifier: BSD-3-Clause
  7. */
  8. #ifndef _FSL_INPUTMUX_H_
  9. #define _FSL_INPUTMUX_H_
  10. #include "fsl_inputmux_connections.h"
  11. #include "fsl_common.h"
  12. /*!
  13. * @addtogroup inputmux_driver
  14. * @{
  15. */
  16. /*! @file */
  17. /*! @file fsl_inputmux_connections.h */
  18. /*******************************************************************************
  19. * Definitions
  20. ******************************************************************************/
  21. /*! @name Driver version */
  22. /*@{*/
  23. /*! @brief Group interrupt driver version for SDK */
  24. #define FSL_INPUTMUX_DRIVER_VERSION (MAKE_VERSION(2, 0, 0)) /*!< Version 2.0.0. */
  25. /*@}*/
  26. /*******************************************************************************
  27. * API
  28. ******************************************************************************/
  29. #ifdef __cplusplus
  30. extern "C" {
  31. #endif
  32. /*!
  33. * @brief Initialize INPUTMUX peripheral.
  34. * This function enables the INPUTMUX clock.
  35. *
  36. * @param base Base address of the INPUTMUX peripheral.
  37. *
  38. * @retval None.
  39. */
  40. void INPUTMUX_Init(INPUTMUX_Type *base);
  41. /*!
  42. * @brief Attaches a signal
  43. *
  44. * This function gates the INPUTPMUX clock.
  45. *
  46. * @param base Base address of the INPUTMUX peripheral.
  47. * @param index Destination peripheral to attach the signal to.
  48. * @param connection Selects connection.
  49. *
  50. * @retval None.
  51. */
  52. void INPUTMUX_AttachSignal(INPUTMUX_Type *base, uint32_t index, inputmux_connection_t connection);
  53. #if defined(FSL_FEATURE_INPUTMUX_HAS_SIGNAL_ENA)
  54. /*!
  55. * @brief Enable/disable a signal
  56. *
  57. * This function gates the INPUTPMUX clock.
  58. *
  59. * @param base Base address of the INPUTMUX peripheral.
  60. * @param signal Enable signal register id and bit offset.
  61. * @param enable Selects enable or disable.
  62. *
  63. * @retval None.
  64. */
  65. void INPUTMUX_EnableSignal(INPUTMUX_Type *base, inputmux_signal_t signal, bool enable);
  66. #endif
  67. /*!
  68. * @brief Deinitialize INPUTMUX peripheral.
  69. * This function disables the INPUTMUX clock.
  70. *
  71. * @param base Base address of the INPUTMUX peripheral.
  72. *
  73. * @retval None.
  74. */
  75. void INPUTMUX_Deinit(INPUTMUX_Type *base);
  76. #ifdef __cplusplus
  77. }
  78. #endif
  79. /*@}*/
  80. #endif /* _FSL_INPUTMUX_H_ */