hal_i2s_lld.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*
  2. ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. /**
  14. * @file hal_i2s_lld.h
  15. * @brief PLATFORM I2S subsystem low level driver header.
  16. *
  17. * @addtogroup I2S
  18. * @{
  19. */
  20. #ifndef HAL_I2S_LLD_H
  21. #define HAL_I2S_LLD_H
  22. #if (HAL_USE_I2S == TRUE) || defined(__DOXYGEN__)
  23. /*===========================================================================*/
  24. /* Driver constants. */
  25. /*===========================================================================*/
  26. /*===========================================================================*/
  27. /* Driver pre-compile time settings. */
  28. /*===========================================================================*/
  29. /**
  30. * @name PLATFORM configuration options
  31. * @{
  32. */
  33. /**
  34. * @brief I2SD1 driver enable switch.
  35. * @details If set to @p TRUE the support for I2S1 is included.
  36. * @note The default is @p FALSE.
  37. */
  38. #if !defined(PLATFORM_I2S_USE_I2S1) || defined(__DOXYGEN__)
  39. #define PLATFORM_I2S_USE_I2S1 FALSE
  40. #endif
  41. /** @} */
  42. /*===========================================================================*/
  43. /* Derived constants and error checks. */
  44. /*===========================================================================*/
  45. /*===========================================================================*/
  46. /* Driver data structures and types. */
  47. /*===========================================================================*/
  48. /*===========================================================================*/
  49. /* Driver macros. */
  50. /*===========================================================================*/
  51. /**
  52. * @brief Low level fields of the I2S driver structure.
  53. */
  54. #define i2s_lld_driver_fields \
  55. /* Dummy field, it is not needed.*/ \
  56. uint32_t dummy
  57. /**
  58. * @brief Low level fields of the I2S configuration structure.
  59. */
  60. #define i2s_lld_config_fields \
  61. /* Dummy configuration, it is not needed.*/ \
  62. uint32_t dummy
  63. /*===========================================================================*/
  64. /* External declarations. */
  65. /*===========================================================================*/
  66. #if (PLATFORM_I2S_USE_I2S1 == TRUE) && !defined(__DOXYGEN__)
  67. extern I2SDriver I2SD1;
  68. #endif
  69. #ifdef __cplusplus
  70. extern "C" {
  71. #endif
  72. void i2s_lld_init(void);
  73. void i2s_lld_start(I2SDriver *i2sp);
  74. void i2s_lld_stop(I2SDriver *i2sp);
  75. void i2s_lld_start_exchange(I2SDriver *i2sp);
  76. void i2s_lld_stop_exchange(I2SDriver *i2sp);
  77. #ifdef __cplusplus
  78. }
  79. #endif
  80. #endif /* HAL_USE_I2S == TRUE */
  81. #endif /* HAL_I2S_LLD_H */
  82. /** @} */