1  /*
2  * Copyright (C) 2017-2024 Alibaba Group Holding Limited
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *     http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 #include <stdio.h>
20 #include <csi_config.h>
21 #include <soc.h>
22 #include <drv/uart.h>
23 #include <drv/timer.h>
24 #include <drv/dma.h>
25 #include <drv/iic.h>
26 #include <drv/rtc.h>
27 #include <drv/spi.h>
28 #include <drv/adc.h>
29 #include <drv/gpio.h>
30 #include <drv/irq.h>
31 #include <drv/pin.h>
32 
33 const csi_perip_info_t g_soc_info[] = {
34     {DW_UART0_BASE,            DW_UART0_IRQn,            0,    DEV_DW_UART_TAG},
35     {DW_TIMER0_BASE,           TIM0_IRQn,                0,    DEV_DW_TIMER_TAG},
36     {DW_TIMER1_BASE,           TIM1_IRQn,                1,    DEV_DW_TIMER_TAG},
37     {DW_TIMER2_BASE,           TIM2_IRQn,                2,    DEV_DW_TIMER_TAG},
38     {DW_TIMER3_BASE,           TIM3_IRQn,                3,    DEV_DW_TIMER_TAG},
39 #if CONFIG_SUPPORT_NMI_DEMO
40     {DW_TIMER4_BASE,           FAKE_IRQ_TIMER4,          4,    DEV_DW_TIMER_TAG},
41 #endif
42     {0, 0, 0, 0}
43 };
44 
45 const uint8_t g_dma_chnum[] = {};
46 
47 const uint16_t uart_tx_hs_num[1] = {};
48 const uint16_t uart_rx_hs_num[1] = {};
49 
50 const csi_dma_ch_desc_t uart0_dma_ch_list[] = {
51     {0xff, 0xff}
52 };
53 
54 const csi_dma_ch_spt_list_t dma_spt_list[] = {
55     {0xFFFFU,         0xFFU,         NULL},
56 };
57 
58 const csi_pinmap_t gpio_pinmap[] = {
59     {0xFFFFFFFFU,   0xFFU, 0xFFU,       0xFFFFFFFFU   },
60 };
61 
62 const csi_pinmap_t uart_pinmap[] = {
63     {0xFFFFFFFFU, 0xFFU, 0xFFU,      0xFFFFFFFFU  },
64 };
65 
66 const csi_clkmap_t clk_map[] = {
67     {0xFFFFFFFFU, 0xFFFFU,          0xFFU}
68 };
69 
70