1 /*
2  * Copyright (c) 2006-2023, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date           Author       Notes
8  * 2023-03-12     Vandoul      the first version
9  */
10 
11 #ifndef __DRV_I2S_H__
12 #define __DRV_I2S_H__
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 #include <rtthread.h>
19 
20 #pragma pack(push,1)
21 struct lpc_i2s_config
22 {
23     uint32_t sampling_rate;
24     uint8_t mode;
25     uint8_t data_bits;
26     uint8_t channels;
27     uint8_t is_blocking;
28 };
29 #pragma pack(pop)
30 
31 #define LPC_I2S_CONFIG_MODE_NULL                0
32 #define LPC_I2S_CONFIG_MODE_SLAVE               1
33 #define LPC_I2S_CONFIG_MODE_MASTER              2
34 
35 #define RT_I2S_CTRL_RESET                       (RT_DEVICE_CTRL_BASE(Bus) + 1)
36 #define RT_I2S_CTRL_SET_CONFIG                  (RT_DEVICE_CTRL_BASE(Bus) + 2)
37 
38 #ifdef __cplusplus
39 }
40 #endif
41 
42 #endif
43 
44