driver test: Use regular target guards for single-target test files

pull/6275/head
Angus Gratton 2020-11-26 19:57:11 +11:00
rodzic 5228d9f9ce
commit beb75b13f2
4 zmienionych plików z 23 dodań i 22 usunięć

Wyświetl plik

@ -13,11 +13,13 @@
// limitations under the License.
/*
Tests for the adc device driver
Tests for the adc device driver on ESP32 only
*/
#include "sdkconfig.h"
#if CONFIG_IDF_TARGET_ESP32
#include "esp_system.h"
#include "driver/adc.h"
#include "driver/dac.h"
#include "driver/rtc_io.h"
#include "driver/gpio.h"
#include "unity.h"
@ -28,8 +30,7 @@
#include "nvs_flash.h"
#include "test_utils.h"
#include "esp_rom_sys.h"
#if !DISABLED_FOR_TARGETS(ESP8266, ESP32S2, ESP32S3) // This testcase for ESP32
#include "driver/dac.h"
/*
* ADC DMA testcase
@ -163,4 +164,4 @@ TEST_CASE("ADC DMA read", "[adc dma]")
example_i2s_deinit();
}
#endif // !DISABLED_FOR_TARGETS(ESP8266, ESP32S2)
#endif // CONFIG_IDF_TARGET_ESP32

Wyświetl plik

@ -13,8 +13,11 @@
// limitations under the License.
/*
Tests for the adc device driver
Tests for the adc device driver on ESP32-S2 only
*/
#include "sdkconfig.h"
#if CONFIG_IDF_TARGET_ESP32S2
#include "esp_system.h"
#include "esp_intr_alloc.h"
@ -22,7 +25,6 @@
#include "freertos/task.h"
#include "freertos/queue.h"
#include "driver/adc.h"
#include "driver/dac.h"
#include "driver/rtc_io.h"
#include "driver/gpio.h"
#include "unity.h"
@ -35,8 +37,7 @@
#include "soc/adc_periph.h"
#include "test/test_common_adc.h"
#include "esp_rom_sys.h"
#if !DISABLED_FOR_TARGETS(ESP8266, ESP32, ESP32S3) // This testcase for ESP32S2
#include "driver/dac.h"
#include "soc/system_reg.h"
#include "soc/spi_reg.h"
@ -636,4 +637,4 @@ TEST_CASE("test_adc_digi_slope_debug", "[adc_dma][ignore]")
}
}
#endif // !DISABLED_FOR_TARGETS(ESP8266, ESP32)
#endif // CONFIG_IDF_TARGET_ESP32S2

Wyświetl plik

@ -13,14 +13,15 @@
// limitations under the License.
/*
Tests for the dac device driver
Tests for the dac device driver on ESP32 only
Hardware connection:
- ESP32: GPIO25 <---> GPIO26
- ESP32S2: GPIO17 <---> GPIO18
*/
#include "sdkconfig.h"
#if CONFIG_IDF_TARGET_ESP32
#include "esp_system.h"
#include "driver/adc.h"
#include "driver/dac.h"
#include "unity.h"
#include "esp_system.h"
#include "esp_event.h"
@ -30,8 +31,7 @@
#include "test_utils.h"
#include "test_dac_audio_file.h"
#include "driver/i2s.h"
#if !DISABLED_FOR_TARGETS(ESP8266, ESP32S2, ESP32S3) // This testcase for ESP32
#include "driver/dac.h"
/*
* DAC DMA config.
@ -166,4 +166,4 @@ TEST_CASE("DAC DMA output", "[dac]")
example_i2s_deinit();
}
#endif // !DISABLED_FOR_TARGETS(ESP8266, ESP32S2)
#endif // CONFIG_IDF_TARGET_ESP32

Wyświetl plik

@ -13,8 +13,10 @@
// limitations under the License.
/*
Tests for the dac device driver
Tests for the dac device driver on ESP32-S2 only
*/
#include "sdkconfig.h"
#if CONFIG_IDF_TARGET_ESP32S2
#include "esp_system.h"
#include "esp_intr_alloc.h"
@ -22,7 +24,6 @@
#include "freertos/task.h"
#include "freertos/queue.h"
#include "driver/adc.h"
#include "driver/dac.h"
#include "driver/rtc_io.h"
#include "driver/gpio.h"
#include "unity.h"
@ -38,9 +39,7 @@
#include "soc/dac_periph.h"
#include "soc/spi_periph.h"
#include "test/test_common_adc.h"
#if !DISABLED_FOR_TARGETS(ESP8266, ESP32, ESP32S3) // This testcase for ESP32S2
#include "driver/dac.h"
#include "soc/system_reg.h"
#include "esp32s2/rom/lldesc.h"
#include "test/test_adc_dac_dma.h"
@ -364,4 +363,4 @@ void adc_dac_dma_linker_deinit(void)
/** SPI DMA INIT CODE END */
/*******************************************/
#endif // !DISABLED_FOR_TARGETS(ESP8266, ESP32)
#endif // CONFIG_IDF_TARGET_ESP32S2