soc: Move esp_ptr_dma_capable() function to soc_memory_layout.h

This commit is contained in:
Angus Gratton 2017-05-05 14:16:02 +10:00 committed by Angus Gratton
parent 71c70cb15c
commit 8d7074ed5c
4 changed files with 10 additions and 1 deletions

View File

@ -53,6 +53,7 @@ queue and re-enabling the interrupt will trigger the interrupt again, which can
#include "freertos/task.h" #include "freertos/task.h"
#include "freertos/ringbuf.h" #include "freertos/ringbuf.h"
#include "soc/soc.h" #include "soc/soc.h"
#include "soc/soc_memory_layout.h"
#include "soc/dport_reg.h" #include "soc/dport_reg.h"
#include "rom/lldesc.h" #include "rom/lldesc.h"
#include "driver/gpio.h" #include "driver/gpio.h"

View File

@ -32,6 +32,7 @@
#include "freertos/task.h" #include "freertos/task.h"
#include "freertos/ringbuf.h" #include "freertos/ringbuf.h"
#include "soc/soc.h" #include "soc/soc.h"
#include "soc/soc_memory_layout.h"
#include "soc/dport_reg.h" #include "soc/dport_reg.h"
#include "rom/lldesc.h" #include "rom/lldesc.h"
#include "driver/gpio.h" #include "driver/gpio.h"

View File

@ -287,6 +287,10 @@
#define SOC_DIRAM_DRAM_LOW 0x3FFE0000 #define SOC_DIRAM_DRAM_LOW 0x3FFE0000
#define SOC_DIRAM_DRAM_HIGH 0x3FFFFFFC #define SOC_DIRAM_DRAM_HIGH 0x3FFFFFFC
// Region of memory accessible via DMA. See esp_ptr_dma_capable().
#define SOC_DMA_LOW 0x3FFAE000
#define SOC_DMA_HIGH 0x40000000
//Interrupt hardware source table //Interrupt hardware source table
//This table is decided by hardware, don't touch this. //This table is decided by hardware, don't touch this.
#define ETS_WIFI_MAC_INTR_SOURCE 0/**< interrupt of WiFi MAC, level*/ #define ETS_WIFI_MAC_INTR_SOURCE 0/**< interrupt of WiFi MAC, level*/

View File

@ -58,4 +58,7 @@ typedef struct
extern const soc_reserved_region_t soc_reserved_regions[]; extern const soc_reserved_region_t soc_reserved_regions[];
extern const size_t soc_reserved_region_count; extern const size_t soc_reserved_region_count;
inline bool esp_ptr_dma_capable(const void *p)
{
return (intptr_t)p >= SOC_DMA_LOW && (intptr_t)p < SOC_DMA_HIGH;
}