1 /**
2 * @file adcbuf_soc.c
3 *
4 * @brief
5 * ADCBUF configuration: This file is provided as a sample
6 * file but it can be customized by application developers to
7 * meet their application requirements.
8 *
9 * \par
10 * NOTE:
11 * (C) Copyright 2021 Texas Instruments, Inc.
12 *
13 * Redistribution and use in source and binary forms, with or without
14 * modification, are permitted provided that the following conditions
15 * are met:
16 *
17 * Redistributions of source code must retain the above copyright
18 * notice, this list of conditions and the following disclaimer.
19 *
20 * Redistributions in binary form must reproduce the above copyright
21 * notice, this list of conditions and the following disclaimer in the
22 * documentation and/or other materials provided with the
23 * distribution.
24 *
25 * Neither the name of Texas Instruments Incorporated nor the names of
26 * its contributors may be used to endorse or promote products derived
27 * from this software without specific prior written permission.
28 *
29 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
30 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
31 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
32 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
33 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
34 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
35 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
36 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
37 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
39 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40 */
42 /**************************************************************************
43 *************************** Include Files ********************************
44 **************************************************************************/
46 #include <stdint.h>
47 #include <ti/drv/adcbuf/adcbuf.h>
48 #include <ti/drv/adcbuf/src/adcbuf_mmwave.h>
50 #define RSS_ADCBUF_DFE_CQ_BASE (0xA2060000U)
52 #if defined (__TI_ARM_V7R4__)
53 #define MSS_RSS_ADC_CAPTURE_COMPLETE (159U)
54 #endif
56 #if defined (_TMS320C6X)
57 #define DSS_RSS_ADC_CAPTURE_COMPLETE (57U)
58 #endif
60 /**************************************************************************
61 ************************** Global Variables ******************************
62 **************************************************************************/
64 const ADCBuf_FxnTable gADCBufFxnTable = {
65 /*! Function to close the specified peripheral */
66 &ADCBUF_MMWave_close,
67 /*! Function to driver implementation specific control function */
68 &ADCBUF_MMWave_control,
69 /*! Function to initialize the given data object */
70 &ADCBUF_MMWave_init,
71 /*! Function to open the specified peripheral */
72 &ADCBUF_MMWave_open,
73 /*! Function to get ADCBuf channel address */
74 &ADCBUF_MMWave_getChanBufAddr
75 };
77 /**
78 * @brief This is AWR2944 ADCBUF specific configuration for MSS/DSS Subsystem.
79 */
80 ADCBuf_HwCfg gADCBufHwCfg[1] =
81 {
82 /* ADCBUF Hardware configuration for MSS: */
83 {
84 ((CSL_rss_ctrlRegs *)CSL_RSS_CTRL_U_BASE),
86 #if defined (__TI_ARM_V7R4__)
87 MSS_RSS_ADC_CAPTURE_COMPLETE,
88 #endif
90 #if defined (_TMS320C6X)
91 DSS_RSS_ADC_CAPTURE_COMPLETE,
92 #endif
93 CSL_RSS_ADCBUF_READ_U_BASE,
94 RSS_ADCBUF_DFE_CQ_BASE
95 }
96 };
98 /**
99 * @brief There is only one ADCBUF .
100 */
101 ADCBuf_Config ADCBuf_config[2] =
102 {
103 /* ADCBuf driver config */
104 {
105 &gADCBufFxnTable, /* ADCBUF Driver Function Table */
106 (void *)NULL, /* ADCBUF Driver Object: */
107 (void const *)&gADCBufHwCfg[0] /* ADCBUF Hw configuration: */
108 },
110 /* Dummy ADCBuf driver config */
111 {
112 NULL, /* ADCBUF Driver Function Table */
113 NULL, /* ADCBUF Driver Object: */
114 NULL /* ADCBUF Hw configuration: */
115 }
116 };