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