Prusa MINI Firmware overview
|
#include <stdlib.h>
#include "FreeRTOS.h"
#include "task.h"
◆ MPU_WRAPPERS_INCLUDED_FROM_API_FILE
#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE |
◆ heapMINIMUM_BLOCK_SIZE
◆ heapBITS_PER_BYTE
#define heapBITS_PER_BYTE ( ( size_t ) 8 ) |
◆ BlockLink_t
◆ prvInsertBlockIntoFreeList()
433 puc = (
uint8_t * ) pxIterator;
437 pxBlockToInsert = pxIterator;
446 puc = (
uint8_t * ) pxBlockToInsert;
469 if( pxIterator != pxBlockToInsert )
◆ prvHeapInit()
379 uxAddress = ( size_t )
ucHeap;
381 if( ( uxAddress & portBYTE_ALIGNMENT_MASK ) != 0 )
384 uxAddress &= ~( ( size_t ) portBYTE_ALIGNMENT_MASK );
385 xTotalHeapSize -= uxAddress - ( size_t )
ucHeap;
388 pucAlignedHeap = (
uint8_t * ) uxAddress;
397 uxAddress = ( ( size_t ) pucAlignedHeap ) + xTotalHeapSize;
399 uxAddress &= ~( ( size_t ) portBYTE_ALIGNMENT_MASK );
400 pxEnd = (
void * ) uxAddress;
406 pxFirstFreeBlock = (
void * ) pucAlignedHeap;
407 pxFirstFreeBlock->
xBlockSize = uxAddress - ( size_t ) pxFirstFreeBlock;
◆ pvPortMalloc()
void* pvPortMalloc |
( |
size_t |
xWantedSize | ) |
|
157 BlockLink_t *pxBlock, *pxPreviousBlock, *pxNewBlockLink;
158 void *pvReturn =
NULL;
181 if( xWantedSize > 0 )
187 if( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) != 0x00 )
191 configASSERT( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) == 0 );
207 pxPreviousBlock = &
xStart;
211 pxPreviousBlock = pxBlock;
217 if( pxBlock !=
pxEnd )
235 pxNewBlockLink = (
void * ) ( ( (
uint8_t * ) pxBlock ) + xWantedSize );
236 configASSERT( ( ( (
size_t ) pxNewBlockLink ) & portBYTE_ALIGNMENT_MASK ) == 0 );
286 #if( configUSE_MALLOC_FAILED_HOOK == 1 )
288 if( pvReturn ==
NULL )
290 extern void vApplicationMallocFailedHook(
void );
291 vApplicationMallocFailedHook();
300 configASSERT( ( ( (
size_t ) pvReturn ) & (
size_t ) portBYTE_ALIGNMENT_MASK ) == 0 );
◆ vPortFree()
317 pxLink = (
void * ) puc;
◆ xPortGetFreeHeapSize()
size_t xPortGetFreeHeapSize |
( |
void |
| ) |
|
◆ xPortGetMinimumEverFreeHeapSize()
size_t xPortGetMinimumEverFreeHeapSize |
( |
void |
| ) |
|
◆ vPortInitialiseBlocks()
◆ ucHeap
◆ xHeapStructSize
◆ xStart
◆ pxEnd
◆ xFreeBytesRemaining
size_t xFreeBytesRemaining = 0U |
|
static |
◆ xMinimumEverFreeBytesRemaining
size_t xMinimumEverFreeBytesRemaining = 0U |
|
static |
◆ xBlockAllocatedBit
size_t xBlockAllocatedBit = 0 |
|
static |
static uint8_t ucHeap[configTOTAL_HEAP_SIZE]
Definition: heap_4.c:106
size_t xBlockSize
Definition: heap_4.c:114
static BlockLink_t * pxEnd
Definition: heap_4.c:140
#define configASSERT(x)
Definition: FreeRTOSConfig.h:162
#define heapMINIMUM_BLOCK_SIZE
Definition: heap_4.c:95
#define traceMALLOC(pvAddress, uiSize)
Definition: FreeRTOS.h:570
#define NULL
Definition: usbd_def.h:53
#define heapBITS_PER_BYTE
Definition: heap_4.c:98
static size_t xMinimumEverFreeBytesRemaining
Definition: heap_4.c:145
#define portBYTE_ALIGNMENT
Definition: portmacro.h:117
static size_t xFreeBytesRemaining
Definition: heap_4.c:144
static size_t xBlockAllocatedBit
Definition: heap_4.c:151
struct A_BLOCK_LINK * pxNextFreeBlock
Definition: heap_4.c:113
#define configTOTAL_HEAP_SIZE
Definition: FreeRTOSConfig.h:112
void
Definition: png.h:1083
static void prvInsertBlockIntoFreeList(BlockLink_t *pxBlockToInsert)
Definition: heap_4.c:419
#define traceFREE(pvAddress, uiSize)
Definition: FreeRTOS.h:574
const uint8_t[]
Definition: 404_html.c:3
static void prvHeapInit(void)
Definition: heap_4.c:371
static const size_t xHeapStructSize
Definition: heap_4.c:137
static BlockLink_t xStart
Definition: heap_4.c:140
PRIVILEGED_FUNCTION BaseType_t xTaskResumeAll(void)
Definition: tasks.c:2017
PRIVILEGED_FUNCTION void vTaskSuspendAll(void)
Definition: tasks.c:1944
#define mtCOVERAGE_TEST_MARKER()
Definition: FreeRTOS.h:748