Fix function prototypes

This commit is contained in:
Angus Gratton
2019-08-12 12:06:07 +10:00
committed by Angus Gratton
parent c47e1756f8
commit 18c5cfadae
46 changed files with 189 additions and 189 deletions

View File

@@ -68,7 +68,7 @@ static bool spiram_inited=false;
true when RAM seems OK, false when test fails. WARNING: Do not run this before the 2nd cpu has been
initialized (in a two-core system) or after the heap allocator has taken ownership of the memory.
*/
bool esp_spiram_test()
bool esp_spiram_test(void)
{
volatile int *spiram=(volatile int*)(SOC_EXTRAM_DATA_HIGH - CONFIG_SPIRAM_SIZE);
size_t p;
@@ -128,7 +128,7 @@ bool esp_spiram_test()
#define SPIRAM_MID_BIG_SIZE_MAP_SIZE DRAM0_DRAM1_DPORT_DBUS3_CACHE_SIZE
void IRAM_ATTR esp_spiram_init_cache()
void IRAM_ATTR esp_spiram_init_cache(void)
{
Cache_Suspend_DCache();
/* map the address from SPIRAM end to the start, map the address in order: DRAM1, DRAM1, DPORT, DBUS3 */
@@ -175,12 +175,12 @@ static uint32_t page0_page = 0xffff;
static uint32_t instrcution_in_spiram = 0;
static uint32_t rodata_in_spiram = 0;
uint32_t esp_spiram_instruction_access_enabled()
uint32_t esp_spiram_instruction_access_enabled(void)
{
return instrcution_in_spiram;
}
uint32_t esp_spiram_rodata_access_enabled()
uint32_t esp_spiram_rodata_access_enabled(void)
{
return rodata_in_spiram;
}
@@ -233,7 +233,7 @@ esp_err_t esp_spiram_enable_rodata_access(void)
return ESP_OK;
}
esp_err_t esp_spiram_init()
esp_err_t esp_spiram_init(void)
{
esp_err_t r;
r = psram_enable(PSRAM_SPEED, PSRAM_MODE);
@@ -256,7 +256,7 @@ esp_err_t esp_spiram_init()
}
esp_err_t esp_spiram_add_to_heapalloc()
esp_err_t esp_spiram_add_to_heapalloc(void)
{
uint32_t size_for_flash = (pages_for_flash << 16);
ESP_EARLY_LOGI(TAG, "Adding pool of %dK of external SPI memory to heap allocator", (CONFIG_SPIRAM_SIZE - (pages_for_flash << 16))/1024);
@@ -319,7 +319,7 @@ esp_err_t esp_spiram_reserve_dma_pool(size_t size) {
return heap_caps_add_region_with_caps(caps, (intptr_t) dma_heap, (intptr_t) dma_heap+size-1);
}
size_t esp_spiram_get_size()
size_t esp_spiram_get_size(void)
{
return CONFIG_SPIRAM_SIZE;
}
@@ -328,7 +328,7 @@ size_t esp_spiram_get_size()
Before flushing the cache, if psram is enabled as a memory-mapped thing, we need to write back the data in the cache to the psram first,
otherwise it will get lost. For now, we just read 64/128K of random PSRAM memory to do this.
*/
void IRAM_ATTR esp_spiram_writeback_cache()
void IRAM_ATTR esp_spiram_writeback_cache(void)
{
extern void Cache_WriteBack_All(void);
int cache_was_disabled=0;