]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/blob - packages/ti/drv/adcbuf/soc/awr294x/adcbuf_soc.c
modified adcbuf driver to use CSL library for its functionality.
[processor-sdk/pdk.git] / packages / ti / drv / adcbuf / soc / awr294x / adcbuf_soc.c
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  ************************* Extern Declarations ****************************
62  **************************************************************************/
64 /**
65  * @brief   This is the ADCBUF Driver registered function table
66  */
67 extern const ADCBuf_FxnTable gADCBufFxnTable;
69 /**************************************************************************
70  ************************** Global Variables ******************************
71  **************************************************************************/
74 /**
75  * @brief   This is AWR2944 ADCBUF specific configuration for MSS/DSS Subsystem.
76  */
77 ADCBuf_HwCfg gADCBufHwCfg[1] =
78 {
79     /* ADCBUF Hardware configuration for MSS: */
80     {
81         ((CSL_rss_ctrlRegs *)CSL_RSS_CTRL_U_BASE),
83         #if defined (__TI_ARM_V7R4__)
84                 MSS_RSS_ADC_CAPTURE_COMPLETE,
85         #endif
87         #if defined (_TMS320C6X)
88                 DSS_RSS_ADC_CAPTURE_COMPLETE,
89         #endif
90                 CSL_RSS_ADCBUF_READ_U_BASE,
91                 RSS_ADCBUF_DFE_CQ_BASE
92     }
93 };
95 /**
96  * @brief   There is only one ADCBUF .
97  */
98 ADCBuf_Config ADCBuf_config[2] =
99 {
100     /* ADCBuf driver config */
101     {
102         &gADCBufFxnTable,                      /* ADCBUF Driver Function Table            */
103         (void *)NULL,                          /* ADCBUF Driver Object:                   */
104         (void const *)&gADCBufHwCfg[0]         /* ADCBUF Hw configuration:                */
105     },
107     /* Dummy ADCBuf driver config */
108     {
109         NULL,                                  /* ADCBUF Driver Function Table            */
110         NULL,                                  /* ADCBUF Driver Object:                   */
111         NULL                                   /* ADCBUF Hw configuration:                */
112     }
113 };