mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-05-22 01:27:11 +08:00
fix(esp8266): Fix header files dependency in esp8266
Closes https://github.com/espressif/ESP8266_RTOS_SDK/issues/197
This commit is contained in:
@ -15,14 +15,18 @@
|
||||
#ifndef __GPIO_H__
|
||||
#define __GPIO_H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "esp8266/eagle_soc.h"
|
||||
#include "esp8266/gpio_register.h"
|
||||
#include "esp8266/pin_mux_register.h"
|
||||
|
||||
#include "freertos/portmacro.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "esp8266/gpio_register.h"
|
||||
|
||||
#define ETS_GPIO_INTR_ENABLE() _xt_isr_unmask(1 << ETS_GPIO_INUM)
|
||||
#define ETS_GPIO_INTR_DISABLE() _xt_isr_mask(1 << ETS_GPIO_INUM)
|
||||
|
||||
|
@ -15,6 +15,8 @@
|
||||
#ifndef __HW_TIMER_H__
|
||||
#define __HW_TIMER_H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -15,7 +15,12 @@
|
||||
#ifndef __I2C_MASTER_H__
|
||||
#define __I2C_MASTER_H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "esp_misc.h"
|
||||
|
||||
#include "esp8266/pin_mux_register.h"
|
||||
#include "gpio.h"
|
||||
|
||||
#define I2C_MASTER_SDA_MUX PERIPHS_IO_MUX_GPIO2_U
|
||||
#define I2C_MASTER_SCL_MUX PERIPHS_IO_MUX_GPIO4_U
|
||||
|
@ -19,6 +19,8 @@
|
||||
#ifndef __SPI_INTERFACE_H__
|
||||
#define __SPI_INTERFACE_H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "spi_register.h"
|
||||
|
||||
//*****************************************************************************
|
||||
|
@ -15,6 +15,8 @@
|
||||
#ifndef SPI_REGISTER_H_INCLUDED
|
||||
#define SPI_REGISTER_H_INCLUDED
|
||||
|
||||
#include "esp8266/eagle_soc.h"
|
||||
|
||||
#define REG_SPI_BASE(i) (0x60000200-i*0x100)
|
||||
#define SPI_CMD(i) (REG_SPI_BASE(i) + 0x0)
|
||||
|
||||
|
@ -15,12 +15,16 @@
|
||||
#ifndef __UART_H__
|
||||
#define __UART_H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "esp8266/uart_register.h"
|
||||
|
||||
#include "freertos/portmacro.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp8266/uart_register.h"
|
||||
|
||||
#define ETS_UART_INTR_ENABLE() _xt_isr_unmask(1 << ETS_UART_INUM)
|
||||
#define ETS_UART_INTR_DISABLE() _xt_isr_mask(1 << ETS_UART_INUM)
|
||||
#define UART_INTR_MASK 0x1ff
|
||||
|
@ -25,6 +25,8 @@
|
||||
#ifndef _GPIO_REGISTER_H_
|
||||
#define _GPIO_REGISTER_H_
|
||||
|
||||
#include "eagle_soc.h"
|
||||
|
||||
#define PERIPHS_GPIO_BASEADDR 0x60000300
|
||||
|
||||
#define GPIO_OUT_ADDRESS 0x00
|
||||
|
@ -24,7 +24,9 @@
|
||||
|
||||
#ifndef _PIN_MUX_H_
|
||||
#define _PIN_MUX_H_
|
||||
|
||||
#include "eagle_soc.h"
|
||||
|
||||
#define PERIPHS_IO_MUX 0x60000800
|
||||
|
||||
#define PERIPHS_IO_MUX_FUNC 0x13
|
||||
|
@ -25,6 +25,8 @@
|
||||
#ifndef SPI_REGISTER_H_INCLUDED
|
||||
#define SPI_REGISTER_H_INCLUDED
|
||||
|
||||
#include "eagle_soc.h"
|
||||
|
||||
#define REG_SPI_BASE(i) (0x60000200 - i*0x100)
|
||||
|
||||
#define SPI_CMD(i) (REG_SPI_BASE(i) + 0x0)
|
||||
|
@ -25,6 +25,8 @@
|
||||
#ifndef _TIMER_REGISTER_H_
|
||||
#define _TIMER_REGISTER_H_
|
||||
|
||||
#include "eagle_soc.h"
|
||||
|
||||
#define PERIPHS_TIMER_BASEDDR 0x60000600
|
||||
|
||||
#define FRC1_LOAD_ADDRESS (PERIPHS_TIMER_BASEDDR + 0x0)
|
||||
|
@ -25,6 +25,8 @@
|
||||
#ifndef UART_REGISTER_H_
|
||||
#define UART_REGISTER_H_
|
||||
|
||||
#include "eagle_soc.h"
|
||||
|
||||
#define REG_UART_BASE(i) (0x60000000 + (i)*0xf00)
|
||||
//version value:32'h062000
|
||||
|
||||
|
Reference in New Issue
Block a user