Skip to content

Commit

Permalink
test(sd): added .cpp build test
Browse files Browse the repository at this point in the history
  • Loading branch information
Icarus113 committed Aug 29, 2024
1 parent af4315a commit 2133ca9
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/hal/include/hal/spi_hal.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ typedef struct {
#if SOC_SPI_AS_CS_SUPPORTED
uint32_t as_cs : 1; ///< Whether to toggle the CS while the clock toggles, device specific
#endif
uint32_t positive_cs : 1; ///< Whether the positive CS feature is abled, device specific
uint32_t positive_cs : 1; ///< Whether the positive CS feature is enabled, device specific
};//boolean configurations
} spi_hal_dev_config_t;

Expand Down
3 changes: 2 additions & 1 deletion tools/test_apps/system/cxx_build_test/main/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
set(srcs cxx_build_test_main.cpp
test_soc_reg_macros.cpp
test_cxx_standard.cpp)
test_cxx_standard.cpp
test_sdmmc_sdspi_init.cpp)

if(CONFIG_SOC_I2C_SUPPORTED)
list(APPEND srcs test_i2c_lcd.cpp)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "soc/soc_caps.h"

#if SOC_SDMMC_HOST_SUPPORTED
#include "driver/sdmmc_host.h"
#endif

#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()
{
#if SOC_SDMMC_HOST_SUPPORTED
sdmmc_host_t sdmmc_host = SDMMC_HOST_DEFAULT();
(void) sdmmc_host;
sdmmc_slot_config_t sdmmc_slot = SDMMC_SLOT_CONFIG_DEFAULT();
(void) sdmmc_slot;
#endif
sdmmc_host_t sdspi_host = SDSPI_HOST_DEFAULT();
(void) sdspi_host;
sdspi_device_config_t sdspi_dev = SDSPI_DEVICE_CONFIG_DEFAULT();
(void) sdspi_dev;
}

0 comments on commit 2133ca9

Please sign in to comment.