FreeRTOS
Macros | Functions | Variables
FreeRTOS_AVR.c File Reference

FreeRTOS for AVR Arduino. More...

#include <Arduino.h>
#include <FreeRTOS_AVR.h>
#include <stdlib.h>
Include dependency graph for FreeRTOS_AVR.c:

Macros

#define CAL_FACTOR   (F_CPU/20000)
 

Functions

void assertBlink ()
 
static void delayMS (uint32_t millis)
 
static void errorBlink (int n)
 
size_t freeHeap ()
 
void vApplicationMallocFailedHook ()
 
void vApplicationStackOverflowHook (TaskHandle_t pxTask, char *pcTaskName)
 

Variables

char * __brkval
 

Detailed Description

FreeRTOS for AVR Arduino.

Macro Definition Documentation

#define CAL_FACTOR   (F_CPU/20000)

calibration factor for delayMS

Function Documentation

void assertBlink ( )

assertBlink Blink one short pulse every two seconds if configASSERT fails.

static void delayMS ( uint32_t  millis)
static

delay between led error flashes

Parameters
[in]millismilliseconds to delay
static void errorBlink ( int  n)
static

Blink error pattern

Parameters
[in]nnumber of short pulses
size_t freeHeap ( )
Returns
free heap size
void vApplicationMallocFailedHook ( )

vApplicationMallocFailedHook() Blink two short pulses if malloc fails.

 will only be called if
 configUSE_MALLOC_FAILED_HOOK is set to 1 in FreeRTOSConfig.h.  It is a hook
 function that will get called if a call to pvPortMalloc() fails.
 pvPortMalloc() is called internally by the kernel whenever a task, queue,
 timer or semaphore is created.  It is also called by various parts of the
 demo application.  If heap_1.c or heap_2.c are used, then the size of the
 heap available to pvPortMalloc() is defined by configTOTAL_HEAP_SIZE in
 FreeRTOSConfig.h, and the xPortGetFreeHeapSize() API function can be used
 to query the size of free heap space that remains (although it does not
 provide information on how the remaining heap might be fragmented).  
void vApplicationStackOverflowHook ( TaskHandle_t  pxTask,
char *  pcTaskName 
)

Blink three short pulses if stack overflow is detected. Run time stack overflow checking is performed if configCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2. This hook function is called if a stack overflow is detected.

Parameters
[in]pxTaskTask handle
[in]pcTaskNameTask name

Variable Documentation

char* __brkval

current begining of heap