From e5d34505b0c62e66d95a0e3731caf0a36e69e770 Mon Sep 17 00:00:00 2001 From: rtel Date: Wed, 2 Jul 2014 10:20:35 +0000 Subject: [PATCH] Check in the portable.h version required to use heap_5.c. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2268 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- FreeRTOS/Source/include/portable.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/FreeRTOS/Source/include/portable.h b/FreeRTOS/Source/include/portable.h index b12a8baff..b602d8aa5 100644 --- a/FreeRTOS/Source/include/portable.h +++ b/FreeRTOS/Source/include/portable.h @@ -363,6 +363,27 @@ extern "C" { StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters ) PRIVILEGED_FUNCTION; #endif +/* Used by heap_5.c. */ +typedef struct HeapRegion +{ + uint8_t *pucStartAddress; + size_t xSizeInBytes; +} HeapRegion_t; + +/* + * Used to define multiple heap regions for use by heap_5.c. This function + * must be called before any calls to pvPortMalloc() - not creating a task, + * queue, semaphore, mutex, software timer, event group, etc. will result in + * pvPortMalloc being called. + * + * pxHeapRegions passes in an array of HeapRegion_t structures - each of which + * defines a region of memory that can be used as the heap. The array is + * terminated by a HeapRegions_t structure that has a size of 0. The region + * with the lowest start address must appear first in the array. + */ +void vPortDefineHeapRegions( HeapRegion_t *pxHeapRegions ); + + /* * Map to the memory management routines required for the port. */ -- 2.39.5