VSF Documented
i2s.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright(C)2009-2022 by VSF Team *
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#ifndef __HAL_DRIVER_AIC8800_I2S_H__
19#define __HAL_DRIVER_AIC8800_I2S_H__
20
21/*============================ INCLUDES ======================================*/
22
23#include "hal/vsf_hal_cfg.h"
24
25#if VSF_HAL_USE_I2S == ENABLED
26
27#include "../__device.h"
28
29/*============================ MACROS ========================================*/
30/*============================ TYPES =========================================*/
31
32typedef enum vsf_i2s_irq_mask_t {
36
37typedef enum vsf_i2s_mode_t {
38 VSF_I2S_MODE_MASTER = (1 << 21), // master mode not tested
39 VSF_I2S_MODE_SLAVE = (0 << 21),
40
41 // todo: how to support LSB mode?
44
45 VSF_I2S_LRCK_POL = (1 << 12),
46 VSF_I2S_BCK_POL = (1 << 13),
47
51
52 // software bits below
57
62
66
67/*============================ INCLUDES ======================================*/
68/*============================ TYPES =========================================*/
69/*============================ INCLUDES ======================================*/
70/*============================ GLOBAL VARIABLES ==============================*/
71/*============================ LOCAL VARIABLES ===============================*/
72/*============================ PROTOTYPES ====================================*/
73/*============================ IMPLEMENTATION ================================*/
74
75#endif /* __HAL_DRIVER_AIC8800_I2S_H__ */
76#endif /* EOF */
vsf_i2s_mode_t
Definition i2s.h:37
@ VSF_I2S_MCLK_OUTPUT
Definition i2s.h:63
@ VSF_I2S_STANDARD_LSB
Definition i2s.h:64
@ VSF_I2S_DATA_BITLEN_16
Definition i2s.h:54
@ __I2S_FRAME_BITLEN_POS
Definition i2s.h:58
@ VSF_I2S_FRAME_BITLEN_32
Definition i2s.h:61
@ VSF_I2S_FRAME_BITLEN_16
Definition i2s.h:59
@ VSF_I2S_STANDARD_MSB
Definition i2s.h:42
@ __I2S_DATA_BITLEN_POS
Definition i2s.h:53
@ VSF_I2S_MODE_MASTER
Definition i2s.h:38
@ VSF_I2S_LRCK_POL
Definition i2s.h:45
@ VSF_I2S_DATA_BITLEN_32
Definition i2s.h:56
@ VSF_I2S_STANDARD_PHILIPS
Definition i2s.h:43
@ __I2S_HW_FEATURE_MASK
Definition i2s.h:48
@ VSF_I2S_DATA_BITLEN_24
Definition i2s.h:55
@ VSF_I2S_FRAME_BITLEN_24
Definition i2s.h:60
@ VSF_I2S_MODE_SLAVE
Definition i2s.h:39
@ VSF_I2S_BCK_POL
Definition i2s.h:46
vsf_i2s_irq_mask_t
Definition i2s.h:32
@ VSF_I2S_IRQ_MASK_RX_TGL_BUFFER
Definition i2s.h:34
@ VSF_I2S_IRQ_MASK_TX_TGL_BUFFER
Definition i2s.h:33