/ components / driver / test / test_sdmmc_sdspi_init.cpp
test_sdmmc_sdspi_init.cpp
 1  #include "soc/soc_caps.h"
 2  
 3  #if SOC_SDMMC_HOST_SUPPORTED
 4  #include "driver/sdmmc_host.h"
 5  #endif
 6  
 7  #include "driver/sdspi_host.h"
 8  
 9  
10  /**
11   * Check that C-style designated initializers are valid in C++ file.
12   */
13  static void test_initializers() __attribute__((unused));
14  
15  static void test_initializers()
16  {
17  #if SOC_SDMMC_HOST_SUPPORTED
18      sdmmc_host_t sdmmc_host = SDMMC_HOST_DEFAULT();
19      (void) sdmmc_host;
20      sdmmc_slot_config_t sdmmc_slot = SDMMC_SLOT_CONFIG_DEFAULT();
21      (void) sdmmc_slot;
22  #endif
23      sdmmc_host_t sdspi_host = SDSPI_HOST_DEFAULT();
24      (void) sdspi_host;
25      sdspi_slot_config_t sdspi_slot = SDSPI_SLOT_CONFIG_DEFAULT();
26      (void) sdspi_slot;
27      sdspi_device_config_t sdspi_dev = SDSPI_DEVICE_CONFIG_DEFAULT();
28      (void) sdspi_dev;
29  }