Browse Source

Add driver support for IDF 3.3

pull/279/head
me-no-dev 4 years ago
parent
commit
6f8489ea55
  1. 14
      target/esp32/ll_cam.c
  2. 4
      target/private_include/ll_cam.h

14
target/esp32/ll_cam.c

@ -15,7 +15,21 @@ @@ -15,7 +15,21 @@
#include <stdio.h>
#include <string.h>
#include "soc/i2s_struct.h"
#if ESP_IDF_VERSION_MAJOR >= 4
#include "hal/gpio_ll.h"
#else
#include "rom/ets_sys.h"
#include "soc/gpio_periph.h"
#define esp_rom_delay_us ets_delay_us
static inline int gpio_ll_get_level(gpio_dev_t *hw, int gpio_num)
{
if (gpio_num < 32) {
return (hw->in >> gpio_num) & 0x1;
} else {
return (hw->in1.data >> (gpio_num - 32)) & 0x1;
}
}
#endif
#include "ll_cam.h"
#include "xclk.h"
#include "cam_hal.h"

4
target/private_include/ll_cam.h

@ -17,7 +17,11 @@ @@ -17,7 +17,11 @@
#include <stdint.h>
#include "sdkconfig.h"
#if CONFIG_IDF_TARGET_ESP32
#if ESP_IDF_VERSION_MAJOR >= 4
#include "esp32/rom/lldesc.h"
#else
#include "rom/lldesc.h"
#endif
#elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/rom/lldesc.h"
#elif CONFIG_IDF_TARGET_ESP32S3

Loading…
Cancel
Save