app_i2s.h
Go to the documentation of this file.
1 /**
2 ****************************************************************************************
3 *
4 * @file app_i2s.h
5 * @author BLE Driver Team
6 * @brief Header file containing functions prototypes of I2S app library.
7 *
8 ****************************************************************************************
9 * @attention
10 #####Copyright (c) 2019 GOODIX
11 All rights reserved.
12
13 Redistribution and use in source and binary forms, with or without
14 modification, are permitted provided that the following conditions are met:
15 * Redistributions of source code must retain the above copyright
16 notice, this list of conditions and the following disclaimer.
17 * Redistributions in binary form must reproduce the above copyright
18 notice, this list of conditions and the following disclaimer in the
19 documentation and/or other materials provided with the distribution.
20 * Neither the name of GOODIX nor the names of its contributors may be used
21 to endorse or promote products derived from this software without
22 specific prior written permission.
23
24 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
28 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 POSSIBILITY OF SUCH DAMAGE.
35 ****************************************************************************************
36 */
37
38 /** @addtogroup PERIPHERAL Peripheral Driver
39 * @{
40 */
41
42 /** @addtogroup APP_DRIVER APP DRIVER
43 * @{
44 */
45
46 /** @defgroup APP_I2S I2S
47 * @brief I2S APP module driver.
48 * @{
49 */
50
51
52 #ifndef _APP_I2S_H_
53 #define _APP_I2S_H_
54
55 #include <stdbool.h>
56 #include "grx_hal.h"
57 #include "app_io.h"
58 #include "app_dma.h"
59 #include "app_drv_error.h"
60 #include "app_drv_config.h"
61
62 #ifdef __cplusplus
63 extern "C" {
64 #endif
65
66 #ifdef HAL_I2S_MODULE_ENABLED
67
68 /** @addtogroup APP_I2S_ENUM Enumerations
69 * @{
70 */
71
72 /**
73 * @brief I2S module Enumerations definition
74 */
75 typedef enum
76 {
77 APP_I2S_ID_SLAVE, /**< I2S slave module. */
78 APP_I2S_ID_MASTER, /**< I2S master module. */
79 APP_I2S_ID_MAX /**< Only for check parameter, not used as input parameters. */
80 } app_i2s_id_t;
81
82 /**
83 * @brief I2S event Enumerations definition
84 */
85 typedef enum
86 {
87 APP_I2S_EVT_ERROR, /**< Error reported by UART peripheral. */
88 APP_I2S_EVT_TX_CPLT, /**< Requested TX transfer completed. */
89 APP_I2S_EVT_RX_DATA, /**< Requested RX transfer completed. */
90 APP_I2S_EVT_TX_RX, /**< Requested TX/RX transfer completed. */
91 } app_i2s_evt_type_t;
92 /** @} */
93
94
95 /** @addtogroup APP_I2S_STRUCTURES Structures
96 * @{
97 */
98
99 /**
100 * @brief I2S pins Structures
101 */
102 typedef struct
103 {
104 app_io_type_t type; /**< Specifies the type of I2S IO. */
105 app_io_mux_t mux; /**< Specifies the Peripheral to be connected to the selected pins. */
106 uint32_t pin; /**< Specifies the IO pins to be configured.
107 This parameter can be any value of @ref GR5xxx_pins. */
108 app_io_pull_t pull; /**< Specifies the Pull-up or Pull-Down activation for the selected pins. */
109 } app_i2s_pin_t;
110
111 /**
112 * @brief I2S pins config Structures
113 */
114 typedef struct
115 {
116 app_i2s_pin_t ws; /**< Set the configuration of I2S WS pin. */
117 app_i2s_pin_t sdo; /**< Set the configuration of I2S SDO pin. */
118 app_i2s_pin_t sdi; /**< Set the configuration of I2S SDI pin. */
119 app_i2s_pin_t sclk; /**< Set the configuration of I2S SCLK pin. */
120 } app_i2s_pin_cfg_t;
121
122 /**
123 * @brief I2S operate mode Enumerations definition
124 */
125 typedef struct
126 {
127 dma_regs_t *tx_dma_instance;/**< Specifies the TX DMA inistall.*/
128 dma_regs_t *rx_dma_instance;/**< Specifies the RX DMA inistall.*/
129 dma_channel_t tx_dma_channel; /**< Specifies the dma channel of I2S TX. */
130 dma_channel_t rx_dma_channel; /**< Specifies the dma channel of I2S RX. */
131 } app_i2s_dma_cfg_t;
132
133 /**
134 * @brief I2S event structure definition
135 */
136 typedef struct
137 {
138 app_i2s_evt_type_t type; /**< Type of event. */
139 union
140 {
141 uint32_t error_code; /**< I2S Error code . */
142 uint16_t size; /**< I2S transmitted/received counter. */
143 } data; /**< Data of event. */
144 } app_i2s_evt_t;
145
146 /**@brief App i2s state types. */
147 typedef enum
148 {
149 APP_I2S_INVALID = 0,
150 APP_I2S_ACTIVITY,
151 #ifdef APP_DRIVER_WAKEUP_CALL_FUN
152 APP_I2S_SLEEP,
153 #endif
154 } app_i2s_state_t;
155
156
157 /**@brief App i2s dma state types. */
158 typedef enum
159 {
160 APP_I2S_DMA_INVALID = 0,
161 APP_I2S_DMA_ACTIVITY,
162 } app_i2s_dma_state_t;
163
164 /**
165 * @brief I2S event callback definition
166 */
167 typedef void (*app_i2s_evt_handler_t)(app_i2s_evt_t *p_evt);
168
169 /** @} */
170
171 /**
172 * @brief I2S device structure definition
173 */
174 typedef struct
175 {
176 app_i2s_evt_handler_t evt_handler; /**< I2S event callback definition. */
177 i2s_handle_t handle; /**< I2S handle definition. */
178 app_i2s_pin_cfg_t *p_pin_cfg; /**< I2S pins config Structures. */
179 dma_id_t dma_id[2]; /**< DMA id definition. */
180 app_i2s_state_t i2s_state; /**< I2S state types. */
181 app_i2s_dma_state_t i2s_dma_state; /**< I2S dma state types.. */
182 bool start_flag; /**< Start flag definition. */
183 } i2s_env_t;
184
185 /**
186 * @brief I2S parameters structure definition
187 */
188 typedef struct
189 {
190 app_i2s_id_t id; /**< specified I2S module ID. */
191 app_i2s_pin_cfg_t pin_cfg; /**< the pin configuration information for the specified I2S module. */
192 app_i2s_dma_cfg_t dma_cfg; /**< I2S operate mode Enumerations definition. */
193 i2s_init_t init; /**< I2S communication parameters. */
194 i2s_env_t i2s_env; /**< I2S device structure definition. */
195 } app_i2s_params_t;
196
197 /* Exported functions --------------------------------------------------------*/
198 /** @addtogroup HAL_APP_I2S_DRIVER_FUNCTIONS Functions
199 * @{
200 */
201
202 /**
203 ****************************************************************************************
204 * @brief Initialize the APP I2S DRIVER according to the specified parameters
205 * in the app_i2s_params_t and app_i2s_evt_handler_t.
206 * @note If interrupt mode is set, you can use blocking mode. Conversely, if blocking mode
207 * is set, you can't use interrupt mode.
208 *
209 * @param[in] p_params: Pointer to app_i2s_params_t parameter which contains the
210 * configuration information for the specified I2S module.
211 * @param[in] evt_handler: I2S user callback function.
212 *
213 * @return Result of initialization.
214 ****************************************************************************************
215 */
216 uint16_t app_i2s_init(app_i2s_params_t *p_params, app_i2s_evt_handler_t evt_handler);
217
218 /**
219 ****************************************************************************************
220 * @brief De-initialize the APP I2S DRIVER peripheral.
221 *
222 * @param[in] id: De-initialize for a specific ID.
223 *
224 * @return Result of De-initialization.
225 ****************************************************************************************
226 */
227 uint16_t app_i2s_deinit(app_i2s_id_t id);
228
229 /**
230 ****************************************************************************************
231 * @brief Receive in master or slave mode an amount of data in blocking mode.
232 *
233 * @param[in] id: which I2S module want to receive.
234 * @param[in] p_data: Pointer to data buffer
235 * @param[in] size: Amount of data to be sent
236 * @param[in] timeout: Timeout duration
237 *
238 * @return Result of operation.
239 ****************************************************************************************
240 */
241 uint16_t app_i2s_receive_sync(app_i2s_id_t id, uint16_t *p_data, uint16_t size, uint32_t timeout);
242
243 /**
244 ****************************************************************************************
245 * @brief Receive in master or slave mode an amount of data in non-blocking mode with Interrupt
246 *
247 * @param[in] id: which I2S module want to receive.
248 * @param[in] p_data: Pointer to data buffer
249 * @param[in] size: Amount of data to be sent
250 *
251 * @return Result of operation.
252 ****************************************************************************************
253 */
254 uint16_t app_i2s_receive_async(app_i2s_id_t id, uint16_t *p_data, uint16_t size);
255
256 /**
257 ****************************************************************************************
258 * @brief Transmits in master or slave mode an amount of data in blocking mode.
259 *
260 * @param[in] id: which I2S module want to transmit.
261 * @param[in] p_data: Pointer to data buffer
262 * @param[in] size: Amount of data to be sent
263 * @param[in] timeout: Timeout duration
264 *
265 * @return Result of operation.
266 ****************************************************************************************
267 */
268 uint16_t app_i2s_transmit_sync(app_i2s_id_t id, uint16_t *p_data, uint16_t size, uint32_t timeout);
269
270 /**
271 ****************************************************************************************
272 * @brief Transmits in master or slave mode an amount of data in non-blocking mode with Interrupt
273 *
274 * @param[in] id: which I2S module want to transmit.
275 * @param[in] p_data: Pointer to data buffer
276 * @param[in] size: Amount of data to be sent
277 *
278 * @return Result of operation.
279 ****************************************************************************************
280 */
281 uint16_t app_i2s_transmit_async(app_i2s_id_t id, uint16_t *p_data, uint16_t size);
282
283 /**
284 ****************************************************************************************
285 * @brief Enable the I2S moudle.
286 *
287 * @param[in] id: The I2S module id.
288 *
289 * @return Result of operation.
290 ****************************************************************************************
291 */
292
293 uint16_t app_i2s_enable(app_i2s_id_t id);
294
295 /**
296 ****************************************************************************************
297 * @brief Disable the I2S moudle.
298 *
299 * @param[in] id: The I2S module id.
300 *
301 * @return Result of operation.
302 ****************************************************************************************
303 */
304 uint16_t app_i2s_disable(app_i2s_id_t id);
305
306 /**
307 ****************************************************************************************
308 * @brief Enable the master I2S clock.
309 *
310 * @param[in] id: The I2S master module id.
311 *
312 * @return Result of operation.
313 ****************************************************************************************
314 */
315 uint16_t app_i2s_enable_clock(app_i2s_id_t id);
316
317 /**
318 ****************************************************************************************
319 * @brief Disable the master I2S clock.
320 *
321 * @param[in] id: The I2S master module id.
322 *
323 * @return Result of operation.
324 ****************************************************************************************
325 */
326 uint16_t app_i2s_disable_clock(app_i2s_id_t id);
327
328 /**
329 ****************************************************************************************
330 * @brief Flush the I2S transmitter FIFO.
331 *
332 * @param[in] id: which I2S module want to flush.
333 *
334 * @return Result of operation.
335 ****************************************************************************************
336 */
337 uint16_t app_i2s_flush_tx_fifo(app_i2s_id_t id);
338
339 /**
340 ****************************************************************************************
341 * @brief Flush the I2S receiver FIFO.
342 *
343 * @param[in] id: which I2S module want to flush.
344 *
345 * @return Result of operation.
346 ****************************************************************************************
347 */
348 uint16_t app_i2s_flush_rx_fifo(app_i2s_id_t id);
349
350 /**
351 ****************************************************************************************
352 * @brief Return the I2S handle.
353 *
354 * @param[in] id: I2S Channel ID.
355 *
356 * @return Pointer to the specified ID's I2S handle.
357 ****************************************************************************************
358 */
359 i2s_handle_t *app_i2s_get_handle(app_i2s_id_t id);
360
361 /**
362 ****************************************************************************************
363 * @brief Abort ongoing transfer (blocking mode).
364 * @param id I2S ID
365 * @note This procedure is executed in blocking mode: When exiting
366 * function, Abort is considered as completed.
367 * @retval ::APP_DRV_SUCCESS: Operation is OK.
368 * @retval ::HAL_ERROR: Parameter error or operation not supported.
369 * @retval ::HAL_BUSY: Driver is busy.
370 * @retval ::HAL_TIMEOUT: Timeout occurred.
371 * @retval ::APP_DRV_ERR_INVALID_PARAM: Parameter error.
372 ****************************************************************************************
373 */
374 uint16_t app_i2s_abort(app_i2s_id_t id);
375
376 /**
377 ****************************************************************************************
378 * @brief Transmit and Receive an amount of data in blocking mode.
379 * @param id I2S ID
380 * @param p_tx_data Pointer to transmission data buffer
381 * @param[out] p_rx_data: Pointer to reception data buffer
382 * @param[in] length: Amount of data to be sent and received in bytes
383 * @param[in] timeout: Timeout duration
384 * @retval ::APP_DRV_SUCCESS: Operation is OK.
385 * @retval ::HAL_ERROR: Parameter error or operation not supported.
386 * @retval ::HAL_BUSY: Driver is busy.
387 * @retval ::HAL_TIMEOUT: Timeout occurred.
388 * @retval ::APP_DRV_ERR_INVALID_PARAM: Parameter error.
389 * @retval ::APP_DRV_ERR_BUSY: Driver is busy.
390 ****************************************************************************************
391 */
392 uint16_t app_i2s_transmit_receive_sync(app_i2s_id_t id,
393 uint16_t *p_tx_data,
394 uint16_t *p_rx_data,
395 uint32_t length,
396 uint32_t timeout);
397 /**
398 ****************************************************************************************
399 * @brief Transmit and Receive an amount of data in non-blocking mode with Interrupt.
400 * @param[in] id: I2S ID
401 * @param[in] p_tx_data: Pointer to transmission data buffer
402 * @param[out] p_rx_data: Pointer to reception data buffer
403 * @param[in] length: Amount of data to be sent and received in bytes
404 * @retval ::APP_DRV_SUCCESS: Operation is OK.
405 * @retval ::HAL_ERROR: Parameter error or operation not supported.
406 * @retval ::HAL_BUSY: Driver is busy.
407 * @retval ::HAL_TIMEOUT: Timeout occurred.
408 * @retval ::APP_DRV_ERR_INVALID_PARAM: Parameter error.
409 * @retval ::APP_DRV_ERR_BUSY: Driver is busy.
410 ****************************************************************************************
411 */
412 uint16_t app_i2s_transmit_receive_async(app_i2s_id_t id,
413 uint16_t *p_tx_data,
414 uint16_t *p_rx_data,
415 uint32_t length);
416
417 /** @} */
418
419 #endif
420
421 #ifdef __cplusplus
422 }
423 #endif
424
425 #endif
426
427 /** @} */
428 /** @} */
429 /** @} */
430
431
i2s_env_t::handle
i2s_handle_t handle
I2S handle definition.
Definition: app_i2s.h:177
app_i2s_params_t::id
app_i2s_id_t id
specified I2S module ID.
Definition: app_i2s.h:190
app_i2s_pin_t::mux
app_io_mux_t mux
Specifies the Peripheral to be connected to the selected pins.
Definition: app_i2s.h:105
app_i2s_transmit_sync
uint16_t app_i2s_transmit_sync(app_i2s_id_t id, uint16_t *p_data, uint16_t size, uint32_t timeout)
Transmits in master or slave mode an amount of data in blocking mode.
i2s_env_t::start_flag
bool start_flag
Start flag definition.
Definition: app_i2s.h:182
app_i2s_pin_cfg_t
I2S pins config Structures.
Definition: app_i2s.h:115
app_i2s_enable_clock
uint16_t app_i2s_enable_clock(app_i2s_id_t id)
Enable the master I2S clock.
APP_I2S_DMA_INVALID
@ APP_I2S_DMA_INVALID
Definition: app_i2s.h:160
app_i2s_state_t
app_i2s_state_t
App i2s state types.
Definition: app_i2s.h:148
app_i2s_flush_tx_fifo
uint16_t app_i2s_flush_tx_fifo(app_i2s_id_t id)
Flush the I2S transmitter FIFO.
app_i2s_params_t
I2S parameters structure definition.
Definition: app_i2s.h:189
APP_I2S_ID_MAX
@ APP_I2S_ID_MAX
Only for check parameter, not used as input parameters.
Definition: app_i2s.h:79
app_i2s_evt_t::error_code
uint32_t error_code
I2S Error code .
Definition: app_i2s.h:141
app_i2s_pin_cfg_t::sdi
app_i2s_pin_t sdi
Set the configuration of I2S SDI pin.
Definition: app_i2s.h:118
app_i2s_evt_type_t
app_i2s_evt_type_t
I2S event Enumerations definition.
Definition: app_i2s.h:86
app_i2s_evt_t::size
uint16_t size
I2S transmitted/received counter.
Definition: app_i2s.h:142
i2s_env_t
I2S device structure definition.
Definition: app_i2s.h:175
app_io_pull_t
app_io_pull_t
GPIO pull Enumerations definition.
Definition: app_io.h:181
APP_I2S_ACTIVITY
@ APP_I2S_ACTIVITY
Definition: app_i2s.h:150
app_io_type_t
app_io_type_t
GPIO type Enumerations definition.
Definition: app_io.h:145
app_i2s_deinit
uint16_t app_i2s_deinit(app_i2s_id_t id)
De-initialize the APP I2S DRIVER peripheral.
app_i2s_pin_cfg_t::sdo
app_i2s_pin_t sdo
Set the configuration of I2S SDO pin.
Definition: app_i2s.h:117
app_i2s_dma_state_t
app_i2s_dma_state_t
App i2s dma state types.
Definition: app_i2s.h:159
app_i2s_params_t::i2s_env
i2s_env_t i2s_env
I2S device structure definition.
Definition: app_i2s.h:194
app_i2s_dma_cfg_t::rx_dma_channel
dma_channel_t rx_dma_channel
Specifies the dma channel of I2S RX.
Definition: app_i2s.h:130
app_i2s_disable
uint16_t app_i2s_disable(app_i2s_id_t id)
Disable the I2S moudle.
app_i2s_flush_rx_fifo
uint16_t app_i2s_flush_rx_fifo(app_i2s_id_t id)
Flush the I2S receiver FIFO.
APP_I2S_ID_SLAVE
@ APP_I2S_ID_SLAVE
I2S slave module.
Definition: app_i2s.h:77
APP_I2S_ID_MASTER
@ APP_I2S_ID_MASTER
I2S master module.
Definition: app_i2s.h:78
APP_I2S_INVALID
@ APP_I2S_INVALID
Definition: app_i2s.h:149
app_i2s_receive_sync
uint16_t app_i2s_receive_sync(app_i2s_id_t id, uint16_t *p_data, uint16_t size, uint32_t timeout)
Receive in master or slave mode an amount of data in blocking mode.
APP_I2S_EVT_RX_DATA
@ APP_I2S_EVT_RX_DATA
Requested RX transfer completed.
Definition: app_i2s.h:89
app_io.h
Header file containing functions prototypes of GPIO app library.
app_i2s_transmit_async
uint16_t app_i2s_transmit_async(app_i2s_id_t id, uint16_t *p_data, uint16_t size)
Transmits in master or slave mode an amount of data in non-blocking mode with Interrupt.
app_i2s_pin_t::pin
uint32_t pin
Specifies the IO pins to be configured.
Definition: app_i2s.h:106
app_i2s_evt_t::type
app_i2s_evt_type_t type
Type of event.
Definition: app_i2s.h:138
app_i2s_abort
uint16_t app_i2s_abort(app_i2s_id_t id)
Abort ongoing transfer (blocking mode).
app_i2s_id_t
app_i2s_id_t
I2S module Enumerations definition.
Definition: app_i2s.h:76
app_i2s_params_t::pin_cfg
app_i2s_pin_cfg_t pin_cfg
the pin configuration information for the specified I2S module.
Definition: app_i2s.h:191
i2s_env_t::evt_handler
app_i2s_evt_handler_t evt_handler
I2S event callback definition.
Definition: app_i2s.h:176
app_i2s_pin_t::pull
app_io_pull_t pull
Specifies the Pull-up or Pull-Down activation for the selected pins.
Definition: app_i2s.h:108
app_i2s_evt_t
I2S event structure definition.
Definition: app_i2s.h:137
APP_I2S_DMA_ACTIVITY
@ APP_I2S_DMA_ACTIVITY
Definition: app_i2s.h:161
app_i2s_dma_cfg_t
I2S operate mode Enumerations definition.
Definition: app_i2s.h:126
i2s_env_t::i2s_state
app_i2s_state_t i2s_state
I2S state types.
Definition: app_i2s.h:180
app_i2s_pin_cfg_t::ws
app_i2s_pin_t ws
Set the configuration of I2S WS pin.
Definition: app_i2s.h:116
_i2s_handle
I2S handle Structure definition.
Definition: gr55xx_hal_i2s.h:130
app_i2s_params_t::dma_cfg
app_i2s_dma_cfg_t dma_cfg
I2S operate mode Enumerations definition.
Definition: app_i2s.h:192
grx_hal.h
This file contains all the functions prototypes for the HAL module driver.
app_i2s_pin_t::type
app_io_type_t type
Specifies the type of I2S IO.
Definition: app_i2s.h:104
app_i2s_pin_t
I2S pins Structures.
Definition: app_i2s.h:103
app_i2s_dma_cfg_t::tx_dma_channel
dma_channel_t tx_dma_channel
Specifies the dma channel of I2S TX.
Definition: app_i2s.h:129
APP_I2S_EVT_TX_CPLT
@ APP_I2S_EVT_TX_CPLT
Requested TX transfer completed.
Definition: app_i2s.h:88
app_i2s_pin_cfg_t::sclk
app_i2s_pin_t sclk
Set the configuration of I2S SCLK pin.
Definition: app_i2s.h:119
app_i2s_init
uint16_t app_i2s_init(app_i2s_params_t *p_params, app_i2s_evt_handler_t evt_handler)
Initialize the APP I2S DRIVER according to the specified parameters in the app_i2s_params_t and app_i...
app_i2s_dma_cfg_t::rx_dma_instance
dma_regs_t * rx_dma_instance
Specifies the RX DMA inistall.
Definition: app_i2s.h:128
app_i2s_params_t::init
i2s_init_t init
I2S communication parameters.
Definition: app_i2s.h:193
i2s_env_t::i2s_dma_state
app_i2s_dma_state_t i2s_dma_state
I2S dma state types.
Definition: app_i2s.h:181
_i2s_init
I2S init Structure definition.
Definition: gr55xx_hal_i2s.h:104
i2s_env_t::p_pin_cfg
app_i2s_pin_cfg_t * p_pin_cfg
I2S pins config Structures.
Definition: app_i2s.h:178
app_dma.h
Header file containing functions prototypes of DMA app library.
app_i2s_enable
uint16_t app_i2s_enable(app_i2s_id_t id)
Enable the I2S moudle.
app_i2s_get_handle
i2s_handle_t * app_i2s_get_handle(app_i2s_id_t id)
Return the I2S handle.
APP_I2S_EVT_TX_RX
@ APP_I2S_EVT_TX_RX
Requested TX/RX transfer completed.
Definition: app_i2s.h:90
app_i2s_disable_clock
uint16_t app_i2s_disable_clock(app_i2s_id_t id)
Disable the master I2S clock.
app_i2s_evt_handler_t
void(* app_i2s_evt_handler_t)(app_i2s_evt_t *p_evt)
I2S event callback definition.
Definition: app_i2s.h:167
app_io_mux_t
app_io_mux_t
GPIO mux Enumerations definition.
Definition: app_io.h:253
APP_I2S_EVT_ERROR
@ APP_I2S_EVT_ERROR
Error reported by UART peripheral.
Definition: app_i2s.h:87
app_drv_error.h
Header file of app driver error code.
app_drv_config.h
Header file of app driver config code.
app_i2s_transmit_receive_sync
uint16_t app_i2s_transmit_receive_sync(app_i2s_id_t id, uint16_t *p_tx_data, uint16_t *p_rx_data, uint32_t length, uint32_t timeout)
Transmit and Receive an amount of data in blocking mode.
dma_id_t
int16_t dma_id_t
DMA id definition.
Definition: app_dma.h:98
app_i2s_transmit_receive_async
uint16_t app_i2s_transmit_receive_async(app_i2s_id_t id, uint16_t *p_tx_data, uint16_t *p_rx_data, uint32_t length)
Transmit and Receive an amount of data in non-blocking mode with Interrupt.
app_i2s_dma_cfg_t::tx_dma_instance
dma_regs_t * tx_dma_instance
Specifies the TX DMA inistall.
Definition: app_i2s.h:127
app_i2s_receive_async
uint16_t app_i2s_receive_async(app_i2s_id_t id, uint16_t *p_data, uint16_t size)
Receive in master or slave mode an amount of data in non-blocking mode with Interrupt.
dma_channel_t
dma_channel_t
HAL DMA Channel Enumerations definition.
Definition: gr55xx_hal_dma.h:93