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 <stdint.h> 16 #include "soc/sdio_slave_periph.h" 17 #include "soc/gpio_periph.h" 18 19 // I/O slot of sdio slave: 20 // 0: GPIO 6, 11, 7, 8, 9, 10, 21 // 1: GPIO 14, 15, 2, 4, 12, 13 for CLK, CMD, D0, D1, D2, D3 respectively. 22 // only one peripheral for SDIO and only one slot can work at the same time. 23 // currently slot 0 is occupied by SPI for flash 24 const sdio_slave_slot_info_t sdio_slave_slot_info[2] = { 25 { 26 .clk_gpio = SDIO_SLAVE_SLOT0_IOMUX_PIN_NUM_CLK, 27 .cmd_gpio = SDIO_SLAVE_SLOT0_IOMUX_PIN_NUM_CMD, 28 .d0_gpio = SDIO_SLAVE_SLOT0_IOMUX_PIN_NUM_D0, 29 .d1_gpio = SDIO_SLAVE_SLOT0_IOMUX_PIN_NUM_D1, 30 .d2_gpio = SDIO_SLAVE_SLOT0_IOMUX_PIN_NUM_D2, 31 .d3_gpio = SDIO_SLAVE_SLOT0_IOMUX_PIN_NUM_D3, 32 .func = SDIO_SLAVE_SLOT0_FUNC, 33 }, { 34 .clk_gpio = SDIO_SLAVE_SLOT1_IOMUX_PIN_NUM_CLK, 35 .cmd_gpio = SDIO_SLAVE_SLOT1_IOMUX_PIN_NUM_CMD, 36 .d0_gpio = SDIO_SLAVE_SLOT1_IOMUX_PIN_NUM_D0, 37 .d1_gpio = SDIO_SLAVE_SLOT1_IOMUX_PIN_NUM_D1, 38 .d2_gpio = SDIO_SLAVE_SLOT1_IOMUX_PIN_NUM_D2, 39 .d3_gpio = SDIO_SLAVE_SLOT1_IOMUX_PIN_NUM_D3, 40 .func = SDIO_SLAVE_SLOT1_FUNC, 41 }, 42 }; 43