mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-25 17:52:36 +00:00
sdmmc, sdspi: fix initializers to be C++-compatible, add test
Closes https://github.com/espressif/esp-idf/issues/1861 Closes https://github.com/espressif/arduino-esp32/issues/1312
This commit is contained in:
20
components/driver/test/test_sdmmc_sdspi_init.cpp
Normal file
20
components/driver/test/test_sdmmc_sdspi_init.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "driver/sdmmc_host.h"
|
||||
#include "driver/sdspi_host.h"
|
||||
|
||||
|
||||
/**
|
||||
* Check that C-style designated initializers are valid in C++ file.
|
||||
*/
|
||||
static void test_initializers() __attribute__((unused));
|
||||
|
||||
static void test_initializers()
|
||||
{
|
||||
sdmmc_host_t sdmmc_host = SDMMC_HOST_DEFAULT();
|
||||
(void) sdmmc_host;
|
||||
sdmmc_slot_config_t sdmmc_slot = SDMMC_SLOT_CONFIG_DEFAULT();
|
||||
(void) sdmmc_slot;
|
||||
sdmmc_host_t sdspi_host = SDSPI_HOST_DEFAULT();
|
||||
(void) sdspi_host;
|
||||
sdspi_slot_config_t sdspi_slot = SDSPI_SLOT_CONFIG_DEFAULT();
|
||||
(void) sdspi_slot;
|
||||
}
|
Reference in New Issue
Block a user