1 // Copyright 2015-2018 Espressif Systems (Shanghai) PTE LTD
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #include "soc/sdmmc_periph.h"
16 
17 const sdmmc_slot_info_t sdmmc_slot_info[SOC_SDMMC_NUM_SLOTS] = {
18     {
19         .width = 8,
20         .card_detect = HOST_CARD_DETECT_N_1_IDX,
21         .write_protect = HOST_CARD_WRITE_PRT_1_IDX,
22         .card_int = HOST_CARD_INT_N_1_IDX,
23     },
24     {
25         .width = 4,
26         .card_detect = HOST_CARD_DETECT_N_2_IDX,
27         .write_protect = HOST_CARD_WRITE_PRT_2_IDX,
28         .card_int = HOST_CARD_INT_N_2_IDX,
29     }
30 };
31 
32 const sdmmc_slot_io_info_t sdmmc_slot_gpio_num[SOC_SDMMC_NUM_SLOTS] = {
33     {
34         .clk = SDMMC_SLOT0_IOMUX_PIN_NUM_CLK,
35         .cmd = SDMMC_SLOT0_IOMUX_PIN_NUM_CMD,
36         .d0 = SDMMC_SLOT0_IOMUX_PIN_NUM_D0,
37         .d1 = SDMMC_SLOT0_IOMUX_PIN_NUM_D1,
38         .d2 = SDMMC_SLOT0_IOMUX_PIN_NUM_D2,
39         .d3 = SDMMC_SLOT0_IOMUX_PIN_NUM_D3,
40         .d4 = SDMMC_SLOT0_IOMUX_PIN_NUM_D4,
41         .d5 = SDMMC_SLOT0_IOMUX_PIN_NUM_D5,
42         .d6 = SDMMC_SLOT0_IOMUX_PIN_NUM_D6,
43         .d7 = SDMMC_SLOT0_IOMUX_PIN_NUM_D7,
44     },
45     {
46         .clk = SDMMC_SLOT1_IOMUX_PIN_NUM_CLK,
47         .cmd = SDMMC_SLOT1_IOMUX_PIN_NUM_CMD,
48         .d0 = SDMMC_SLOT1_IOMUX_PIN_NUM_D0,
49         .d1 = SDMMC_SLOT1_IOMUX_PIN_NUM_D1,
50         .d2 = SDMMC_SLOT1_IOMUX_PIN_NUM_D2,
51         .d3 = SDMMC_SLOT1_IOMUX_PIN_NUM_D3,
52         .d4 = -1,  //slot1 has no D4-7
53         .d5 = -1,
54         .d6 = -1,
55         .d7 = -1,
56     }
57 };
58