VSF Documented
vsf_aic1000a.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 __VSF_AIC1000A_H__
19#define __VSF_AIC1000A_H__
20
21/*============================ INCLUDES ======================================*/
22
23#include "../../../vsf_av_cfg.h"
24
25#if VSF_USE_AUDIO == ENABLED && VSF_AUDIO_USE_AIC1000A == ENABLED
26
27#include "component/av/vsf_av.h"
28#include "hal/vsf_hal.h"
29
30#if defined(__VSF_AIC1000A_CLASS_IMPLEMENT)
31# undef __VSF_AIC1000A_CLASS_IMPLEMENT
32# define __VSF_CLASS_IMPLEMENT__
33#endif
34
35#include "utilities/ooc_class.h"
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41/*============================ MACROS ========================================*/
42/*============================ MACROFIED FUNCTIONS ===========================*/
43/*============================ TYPES =========================================*/
44
46 public_member(
47 implement(vk_audio_i2s_dev_t)
48 vsf_gpio_t *pwrkey_port;
49 vsf_gpio_t *psi_port;
50 uint8_t pwrkey_pin;
51 uint8_t psi_clk_pin;
52 uint8_t psi_dat_pin;
53 )
54
55 private_member(
56 bool is_inited;
57
58 struct {
59 bool is_started;
60
61 bool mem_cleared;
62 uint8_t ch_en;
63 uint8_t ch_ana_pu;
64 } dac;
65 struct {
66 bool is_started;
67
68 bool mem_cleared;
69 uint8_t ch_en;
70 uint8_t ch_ana_pu;
71 uint8_t ch_d36_en;
72 uint8_t ch_d36_d3;
73 uint8_t mic_matrix_type;
74 } adc;
75 )
76};
77
78/*============================ GLOBAL VARIABLES ==============================*/
79
81
82/*============================ PROTOTYPES ====================================*/
83
84#ifdef __cplusplus
85}
86#endif
87
88#endif // VSF_USE_AUDIO && VSF_AUDIO_USE_AIC1000A
89#endif // __VSF_AIC1000A_H__
Definition vsf_aic1000a.h:45
Definition vsf_audio.h:74
Definition vsf_audio_i2s.h:49
#define vsf_class(__name)
Definition ooc_class.h:48
unsigned char uint8_t
Definition stdint.h:5
Definition vsf_template_gpio.h:471
const vk_audio_drv_t vk_aic1000a_drv
Definition vsf_aic1000a.c:80