sdio_slave_periph.c 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. // http://www.apache.org/licenses/LICENSE-2.0
  7. //
  8. // Unless required by applicable law or agreed to in writing, software
  9. // distributed under the License is distributed on an "AS IS" BASIS,
  10. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. // See the License for the specific language governing permissions and
  12. // limitations under the License.
  13. #include <stdint.h>
  14. #include "soc/sdio_slave_periph.h"
  15. #include "soc/gpio_periph.h"
  16. // I/O slot of sdio slave:
  17. // 0: GPIO 6, 11, 7, 8, 9, 10,
  18. // 1: GPIO 14, 15, 2, 4, 12, 13 for CLK, CMD, D0, D1, D2, D3 respectively.
  19. // only one peripheral for SDIO and only one slot can work at the same time.
  20. // currently slot 0 is occupied by SPI for flash
  21. const sdio_slave_slot_info_t sdio_slave_slot_info[2] = {
  22. {
  23. .clk_gpio = SDIO_SLAVE_SLOT0_IOMUX_PIN_NUM_CLK,
  24. .cmd_gpio = SDIO_SLAVE_SLOT0_IOMUX_PIN_NUM_CMD,
  25. .d0_gpio = SDIO_SLAVE_SLOT0_IOMUX_PIN_NUM_D0,
  26. .d1_gpio = SDIO_SLAVE_SLOT0_IOMUX_PIN_NUM_D1,
  27. .d2_gpio = SDIO_SLAVE_SLOT0_IOMUX_PIN_NUM_D2,
  28. .d3_gpio = SDIO_SLAVE_SLOT0_IOMUX_PIN_NUM_D3,
  29. .func = SDIO_SLAVE_SLOT0_FUNC,
  30. }, {
  31. .clk_gpio = SDIO_SLAVE_SLOT1_IOMUX_PIN_NUM_CLK,
  32. .cmd_gpio = SDIO_SLAVE_SLOT1_IOMUX_PIN_NUM_CMD,
  33. .d0_gpio = SDIO_SLAVE_SLOT1_IOMUX_PIN_NUM_D0,
  34. .d1_gpio = SDIO_SLAVE_SLOT1_IOMUX_PIN_NUM_D1,
  35. .d2_gpio = SDIO_SLAVE_SLOT1_IOMUX_PIN_NUM_D2,
  36. .d3_gpio = SDIO_SLAVE_SLOT1_IOMUX_PIN_NUM_D3,
  37. .func = SDIO_SLAVE_SLOT1_FUNC,
  38. },
  39. };