Merge branch 'feature/remove_dependency_to_soc' into 'master'

global: remove dependency to soc everywhere except driver and kernel components

See merge request idf/esp-idf!4678
This commit is contained in:
Angus Gratton
2019-04-18 08:08:41 +08:00
74 changed files with 409 additions and 216 deletions

View File

@@ -22,7 +22,7 @@ set(COMPONENT_SRCS "can.c"
"uart.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_PRIV_INCLUDEDIRS "include/driver")
set(COMPONENT_REQUIRES esp_ringbuf)
set(COMPONENT_REQUIRES esp_ringbuf soc) #cannot totally hide soc headers, since there are a lot arguments in the driver are chip-dependent
register_component()

View File

@@ -30,6 +30,7 @@
#include "driver/gpio.h"
#include "driver/periph_ctrl.h"
#include "esp_pm.h"
#include "soc/soc_memory_layout.h"
static const char* I2C_TAG = "i2c";
#define I2C_CHECK(a, str, ret) if(!(a)) { \

View File

@@ -16,16 +16,18 @@
#define _DRIVER_GPIO_H_
#include "esp_err.h"
#include <esp_types.h>
#include "soc/gpio_reg.h"
#include "soc/gpio_struct.h"
#include "soc/rtc_io_reg.h"
#include "soc/io_mux_reg.h"
#include "soc/gpio_sig_map.h"
#include <esp_bit_defs.h>
#include "esp32/rom/gpio.h"
#include "esp_attr.h"
#include "esp_intr_alloc.h"
#include "soc/gpio_periph.h"
#include "sdkconfig.h"
#ifdef CONFIG_LEGACY_INCLUDE_COMMON_HEADERS
#include "soc/rtc_io_reg.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
@@ -566,7 +568,7 @@ esp_err_t gpio_hold_en(gpio_num_t gpio_num);
* the default level if this function is called. If you dont't want the level changes, the gpio should be configured to
* a known state before this function is called.
* e.g.
* If you hold gpio18 high during Deep-sleep, after the chip is woken up and `gpio_hold_dis` is called,
* If you hold gpio18 high during Deep-sleep, after the chip is woken up and `gpio_hold_dis` is called,
* gpio18 will output low level(because gpio18 is input mode by default). If you don't want this behavior,
* you should configure gpio18 as output mode and set it to hight level before calling `gpio_hold_dis`.
*

View File

@@ -26,6 +26,7 @@
#include "soc/rmt_struct.h"
#include "driver/periph_ctrl.h"
#include "driver/rmt.h"
#include "soc/soc_memory_layout.h"
#include <sys/lock.h>
@@ -947,7 +948,7 @@ esp_err_t rmt_get_channel_status(rmt_channel_status_result_t *channel_status)
if( p_rmt_obj[i]->tx_sem != NULL ) {
if( xSemaphoreTake(p_rmt_obj[i]->tx_sem, (TickType_t)0) == pdTRUE ) {
channel_status->status[i] = RMT_CHANNEL_IDLE;
xSemaphoreGive(p_rmt_obj[i]->tx_sem);
xSemaphoreGive(p_rmt_obj[i]->tx_sem);
} else {
channel_status->status[i] = RMT_CHANNEL_BUSY;
}

View File

@@ -93,10 +93,12 @@ The driver of FIFOs works as below:
#include "freertos/FreeRTOS.h"
#include "soc/dport_access.h"
#include "soc/dport_reg.h"
#include "soc/soc_memory_layout.h"
#include "soc/io_mux_reg.h"
#include "freertos/semphr.h"
#include "xtensa/core-macros.h"
#include "driver/periph_ctrl.h"
#include "driver/gpio.h"
#define SDIO_SLAVE_CHECK(res, str, ret_val) do { if(!(res)){\

View File

@@ -1,6 +1,7 @@
#include "test/test_common_spi.h"
#include "driver/spi_slave.h"
#include "esp_log.h"
#include "driver/gpio.h"
int test_freq_default[]=TEST_FREQ_DEFAULT();

View File

@@ -25,6 +25,7 @@
#include "soc/gpio_periph.h"
#include "sdkconfig.h"
#include "../cache_utils.h"
#include "soc/soc_memory_layout.h"
const static char TAG[] = "test_spi";

View File

@@ -6,6 +6,7 @@
#include "unity.h"
#include "driver/spi_master.h"
#include "driver/spi_slave.h"
#include "driver/gpio.h"
#include "esp_log.h"
#include "sdkconfig.h"
#include "test/test_common_spi.h"