Target proper device headers after IDF 4.0

This commit is contained in:
me-no-dev
2020-01-25 05:36:51 +02:00
parent 4cda87fb96
commit b1c9712d11
4 changed files with 32 additions and 3 deletions

View File

@@ -19,7 +19,6 @@
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "rom/lldesc.h"
#include "soc/soc.h"
#include "soc/gpio_sig_map.h"
#include "soc/i2s_reg.h"

View File

@@ -3,7 +3,6 @@
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include "rom/lldesc.h"
#include "esp_err.h"
#include "esp_intr_alloc.h"
#include "freertos/FreeRTOS.h"
@@ -12,6 +11,17 @@
#include "esp_camera.h"
#include "sensor.h"
#include "esp_system.h"
#ifdef ESP_IDF_VERSION_MAJOR // IDF 4+
#if CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4
#include "esp32/rom/lldesc.h"
#else
#error Target CONFIG_IDF_TARGET is not supported
#endif
#else // ESP32 Before IDF 4.0
#include "rom/lldesc.h"
#endif
typedef union {
struct {
uint8_t sample2;