all: Using xxx_periph.h

Using xxx_periph.h in whole IDF instead of xxx_reg.h, xxx_struct.h, xxx_channel.h ... .

Cleaned up header files from unnecessary headers (releated to soc/... headers).
This commit is contained in:
Konstantin Kondrashov
2019-05-13 18:02:45 +08:00
parent 3ddab0b8f3
commit 399d2d2605
144 changed files with 158 additions and 329 deletions

View File

@@ -23,7 +23,7 @@ extern "C" {
#include <stdbool.h>
#include "esp_err.h"
#include "driver/gpio.h"
#include "soc/adc_channel.h"
#include "soc/adc_periph.h"
typedef enum {
ADC_ATTEN_DB_0 = 0, /*!<The input voltage of ADC will be reduced to about 1/1 */

View File

@@ -21,7 +21,7 @@ extern "C" {
#include <stdint.h>
#include "esp_err.h"
#include "soc/dac_channel.h"
#include "soc/dac_periph.h"
typedef enum {
DAC_CHANNEL_1 = 1, /*!< DAC channel 1 is GPIO25 */

View File

@@ -16,12 +16,10 @@
#define _DRIVER_I2S_H_
#include "esp_err.h"
#include <esp_types.h>
#include "soc/gpio_reg.h"
#include "soc/soc.h"
#include "soc/i2s_struct.h"
#include "soc/i2s_reg.h"
#include "soc/rtc_io_reg.h"
#include "soc/io_mux_reg.h"
#include "soc/gpio_periph.h"
#include "soc/i2s_periph.h"
#include "soc/rtc_periph.h"
#include "esp32/rom/gpio.h"
#include "esp_attr.h"
#include "esp_intr_alloc.h"

View File

@@ -20,7 +20,6 @@
#include "driver/gpio.h"
#include "driver/periph_ctrl.h"
#include "esp_intr_alloc.h"
#include "esp_intr_alloc.h"
#ifdef __cplusplus
extern "C" {

View File

@@ -8,11 +8,8 @@
#include "freertos/semphr.h"
#include "freertos/xtensa_api.h"
#include "soc/soc.h"
#include "soc/pcnt_reg.h"
#include "soc/pcnt_struct.h"
#include "soc/gpio_sig_map.h"
#include "soc/pcnt_periph.h"
#include "driver/gpio.h"
#include "esp_intr_alloc.h"
#ifdef __cplusplus
extern "C" {

View File

@@ -15,9 +15,6 @@
#ifndef _DRIVER_PERIPH_CTRL_H_
#define _DRIVER_PERIPH_CTRL_H_
#include "esp_err.h"
#include "soc/soc.h"
#include "soc/dport_reg.h"
#include "soc/periph_defs.h"
#ifdef __cplusplus

View File

@@ -15,9 +15,7 @@
#ifndef _DRIVER_RMT_CTRL_H_
#define _DRIVER_RMT_CTRL_H_
#include "esp_err.h"
#include "soc/rmt_reg.h"
#include "soc/dport_reg.h"
#include "soc/rmt_struct.h"
#include "soc/rmt_periph.h"
#include "freertos/FreeRTOS.h"
#include "freertos/semphr.h"
#include "freertos/xtensa_api.h"

View File

@@ -18,7 +18,6 @@
#include <stdint.h>
#include "esp_err.h"
#include "driver/gpio.h"
#include "soc/rtc_gpio_channel.h"
#include "soc/rtc_periph.h"
#ifdef __cplusplus
extern "C" {

View File

@@ -15,8 +15,7 @@
#ifndef __DRIVER_SIGMADELTA_H__
#define __DRIVER_SIGMADELTA_H__
#include <esp_types.h>
#include "soc/gpio_sd_struct.h"
#include "soc/gpio_sd_reg.h"
#include "soc/sigmadelta_periph.h"
#include "driver/gpio.h"
#ifdef _cplusplus

View File

@@ -17,8 +17,7 @@
#include "esp_err.h"
#include "esp_attr.h"
#include "soc/soc.h"
#include "soc/timer_group_reg.h"
#include "soc/timer_group_struct.h"
#include "soc/timer_periph.h"
#include "esp_intr_alloc.h"
#ifdef __cplusplus

View File

@@ -17,10 +17,9 @@
#ifdef __cplusplus
extern "C" {
#endif
#include "esp_intr_alloc.h"
#include "esp_err.h"
#include "esp_intr_alloc.h"
#include "soc/touch_channel.h"
#include "soc/touch_periph.h"
typedef enum {
TOUCH_PAD_NUM0 = 0, /*!< Touch pad channel 0 is GPIO4 */

View File

@@ -20,8 +20,7 @@
extern "C" {
#endif
#include "soc/uart_reg.h"
#include "soc/uart_struct.h"
#include "soc/uart_periph.h"
#include "esp_err.h"
#include "esp_intr_alloc.h"
#include "driver/periph_ctrl.h"
@@ -32,7 +31,6 @@ extern "C" {
#include "freertos/queue.h"
#include "freertos/ringbuf.h"
#include <esp_types.h>
#include "soc/uart_channel.h"
#define UART_FIFO_LEN (128) /*!< Length of the hardware FIFO buffers */
#define UART_INTR_MASK 0x1ff /*!< Mask of all UART interrupts */