Definition in file GCC/AVR32_UC3/portmacro.h.
#include <avr32/io.h>
#include "intc.h"
#include "compiler.h"
Go to the source code of this file.
Defines | |
| #define | configTICK_TC_IRQ ATPASTE2(AVR32_TC_IRQ, configTICK_TC_CHANNEL) |
| #define | DISABLE_ALL_EXCEPTIONS() Disable_global_exception() |
| #define | DISABLE_ALL_INTERRUPTS() Disable_global_interrupt() |
| #define | DISABLE_INT_LEVEL(int_level) Disable_interrupt_level(int_level) |
| #define | ENABLE_ALL_EXCEPTIONS() Enable_global_exception() |
| #define | ENABLE_ALL_INTERRUPTS() Enable_global_interrupt() |
| #define | ENABLE_INT_LEVEL(int_level) Enable_interrupt_level(int_level) |
| #define | portBASE_TYPE portLONG |
| #define | portBYTE_ALIGNMENT 4 |
| #define | portCHAR char |
| #define | portDBG_TRACE(...) |
| #define | portDISABLE_INTERRUPTS() DISABLE_ALL_INTERRUPTS() |
| #define | portDOUBLE double |
| #define | portENABLE_INTERRUPTS() ENABLE_ALL_INTERRUPTS() |
| #define | portENTER_CRITICAL() vPortEnterCritical(); |
| #define | portENTER_SWITCHING_ISR() |
| #define | portEXIT_CRITICAL() vPortExitCritical(); |
| #define | portEXIT_SWITCHING_ISR() |
| #define | portFLOAT float |
| #define | portLONG long |
| #define | portMAX_DELAY ( portTickType ) 0xffffffff |
| #define | portNOP() {__asm__ __volatile__ ("nop");} |
| #define | portRESTORE_CONTEXT() |
| #define | portRESTORE_CONTEXT_OS_INT() |
| #define | portRESTORE_CONTEXT_SCALL() |
| #define | portSAVE_CONTEXT_OS_INT() |
| #define | portSAVE_CONTEXT_SCALL() |
| #define | portSHORT short |
| #define | portSTACK_GROWTH ( -1 ) |
| #define | portSTACK_TYPE unsigned portLONG |
| #define | portTASK_FUNCTION(vFunction, pvParameters) void vFunction( void *pvParameters ) |
| #define | portTASK_FUNCTION_PROTO(vFunction, pvParameters) void vFunction( void *pvParameters ) |
| #define | portTICK_RATE_MS ( ( portTickType ) 1000 / configTICK_RATE_HZ ) |
| #define | portYIELD() {__asm__ __volatile__ ("scall");} |
| #define | TASK_DELAY_MIN(x) ( (x)*60*1000/portTICK_RATE_MS ) |
| #define | TASK_DELAY_MS(x) ( (x) /portTICK_RATE_MS ) |
| #define | TASK_DELAY_S(x) ( (x)*1000 /portTICK_RATE_MS ) |
Typedefs | |
| typedef unsigned portLONG | portTickType |
Functions | |
| mov | HI (%[ulCriticalNesting])\n\t" "st.w r8[0] |
| mov | LO (%[ulCriticalNesting])\n\t" "orh r8 |
| void * | pvPortRealloc (void *pv, size_t xSize) |
| void | vPortEnterCritical (void) |
| void | vPortExitCritical (void) |
Variables | |
| mov r0 n t sub *n t ldm r8 lr n t ld w | r0 |
| mov r0 n t sub *n t ldm r8 | r12 |
| mov r0 n t sub | r7 |
| mov | r8 |
| mov r0 n t sub *n t ldm r8 lr n t ld w r7[-8 *4] n t st w r0 n t ld w r7[-7 *4] n t st w r0 n t ldm r0 r7 n t sub *n t | rets |
| mov r0 n t sub | sp |
| #define configTICK_TC_IRQ ATPASTE2(AVR32_TC_IRQ, configTICK_TC_CHANNEL) |
| #define DISABLE_ALL_EXCEPTIONS | ( | ) | Disable_global_exception() |
Definition at line 125 of file GCC/AVR32_UC3/portmacro.h.
| #define DISABLE_ALL_INTERRUPTS | ( | ) | Disable_global_interrupt() |
Definition at line 128 of file GCC/AVR32_UC3/portmacro.h.
| #define DISABLE_INT_LEVEL | ( | int_level | ) | Disable_interrupt_level(int_level) |
Definition at line 131 of file GCC/AVR32_UC3/portmacro.h.
| #define ENABLE_ALL_EXCEPTIONS | ( | ) | Enable_global_exception() |
Definition at line 126 of file GCC/AVR32_UC3/portmacro.h.
Referenced by __low_level_init(), and _init_startup().
| #define ENABLE_ALL_INTERRUPTS | ( | ) | Enable_global_interrupt() |
Definition at line 129 of file GCC/AVR32_UC3/portmacro.h.
| #define ENABLE_INT_LEVEL | ( | int_level | ) | Enable_interrupt_level(int_level) |
Definition at line 132 of file GCC/AVR32_UC3/portmacro.h.
| #define portBASE_TYPE portLONG |
Definition at line 97 of file GCC/AVR32_UC3/portmacro.h.
Referenced by __low_level_init(), _init_startup(), portTASK_FUNCTION(), prv1stHigherPriorityNormallyFullTask(), prv2ndHigherPriorityNormallyFullTask(), prvCheckOtherTasksAreStillRunning(), prvDecrementSemaphoreCount(), prvFixedDelayCoRoutine(), prvFlashCoRoutine(), prvHigherPriorityNormallyEmptyTask(), prvHookCoRoutine(), prvIncrementSemaphoreCount(), prvInitialiseCoRoutineLists(), prvInitialiseTaskLists(), prvLowerPriorityNormallyEmptyTask(), prvLowerPriorityNormallyFullTask(), prvRecursiveMutexControllingTask(), prvUSART_ISR_NonNakedBehaviour(), pvPortMalloc(), vApplicationTickHook(), vCreateAltBlockTimeTasks(), vCreateBlockTimeTasks(), vCreateSuicidalTasks(), vErrorChecks(), vPrimaryBlockTimeTestTask(), vprvSerialCreateQueues(), vSecondaryBlockTimeTestTask(), vStartAltBlockingQueueTasks(), vStartAltPolledQueueTasks(), vStartBlockingQueueTasks(), vStartFlashCoRoutines(), vStartHookCoRoutines(), vStartInterruptQueueTasks(), vStartLEDFlashTasks(), vStartPolledQueueTasks(), xAreAltBlockingQueuesStillRunning(), xAreAltBlockTimeTestTasksStillRunning(), xAreAltPollingQueuesStillRunning(), xAreBlockingQueuesStillRunning(), xAreBlockTimeTestTasksStillRunning(), xAreComTestTasksStillRunning(), xAreCountingSemaphoreTasksStillRunning(), xAreDynamicPriorityTasksStillRunning(), xAreIntegerMathsTaskStillRunning(), xAreIntQueueTasksStillRunning(), xAreMathsTaskStillRunning(), xArePollingQueuesStillRunning(), xAreRecursiveMutexTasksStillRunning(), xAreSemaphoreTasksStillRunning(), xCoRoutineCreate(), xCoRoutineRemoveFromEventList(), xFirstTimerHandler(), xIsCreateTaskStillRunning(), and xSecondTimerHandler().
| #define portBYTE_ALIGNMENT 4 |
| #define portCHAR char |
Definition at line 91 of file GCC/AVR32_UC3/portmacro.h.
Referenced by main(), portTASK_FUNCTION(), prvCountingSemaphoreTask(), prvHighestPriorityPeekTask(), prvLowPriorityMutexTask(), prvSendFrontAndBackTest(), prvUSART_ISR_NonNakedBehaviour(), vCreateAltBlockTimeTasks(), vErrorChecks(), vParTestSetLED(), vParTestToggleLED(), vPrimaryBlockTimeTestTask(), vprvSerialCreateQueues(), vSecondaryBlockTimeTestTask(), vSerialPutString(), vStartAltBlockingQueueTasks(), vStartAltGenericQueueTasks(), vStartAltPolledQueueTasks(), vStartCountingSemaphoreTasks(), vStartGenericQueueTasks(), vStartInterruptQueueTasks(), vStartQueuePeekTasks(), and vStartRecursiveMutexTasks().
| #define portDBG_TRACE | ( | ... | ) |
| #define portDISABLE_INTERRUPTS | ( | ) | DISABLE_ALL_INTERRUPTS() |
Definition at line 161 of file GCC/AVR32_UC3/portmacro.h.
Referenced by prvCheckDelayedList(), prvCheckPendingReadyList(), prvSetupTimerInterrupt(), vPortEnterCritical(), vTaskEndScheduler(), and vTaskStartScheduler().
| #define portDOUBLE double |
| #define portENABLE_INTERRUPTS | ( | ) | ENABLE_ALL_INTERRUPTS() |
Definition at line 162 of file GCC/AVR32_UC3/portmacro.h.
Referenced by prvCheckDelayedList(), prvCheckPendingReadyList(), and vPortExitCritical().
| #define portENTER_CRITICAL | ( | ) | vPortEnterCritical(); |
Definition at line 168 of file GCC/AVR32_UC3/portmacro.h.
Referenced by portTASK_FUNCTION(), prv1stHigherPriorityNormallyFullTask(), prv2ndHigherPriorityNormallyFullTask(), prvCheckTasksWaitingTermination(), prvInitialiseTaskLists(), prvLowerPriorityNormallyEmptyTask(), prvUSART_ISR_NonNakedBehaviour(), vPrimaryBlockTimeTestTask(), vSecondaryBlockTimeTestTask(), vTick(), xQueueGenericReceive(), xSerialPortInitMinimal(), xTaskCheckForTimeOut(), xTaskGetTickCount(), and xTaskResumeAll().
| #define portENTER_SWITCHING_ISR | ( | ) |
Value:
{ \
/* Save R0..R7 */ \
__asm__ __volatile__ ("stm --sp, r0-r7"); \
\
/* With the cooperative scheduler, as there is no context switch by interrupt, */ \
/* there is also no context save. */ \
}
Definition at line 536 of file GCC/AVR32_UC3/portmacro.h.
Referenced by vUSART_ISR().
| #define portEXIT_CRITICAL | ( | ) | vPortExitCritical(); |
Definition at line 169 of file GCC/AVR32_UC3/portmacro.h.
Referenced by portTASK_FUNCTION(), prv1stHigherPriorityNormallyFullTask(), prv2ndHigherPriorityNormallyFullTask(), prvCheckTasksWaitingTermination(), prvInitialiseTaskLists(), prvLowerPriorityNormallyEmptyTask(), prvUSART_ISR_NonNakedBehaviour(), vPrimaryBlockTimeTestTask(), vSecondaryBlockTimeTestTask(), vTick(), xQueueGenericReceive(), xSerialPortInitMinimal(), xTaskCheckForTimeOut(), xTaskGetTickCount(), and xTaskResumeAll().
| #define portEXIT_SWITCHING_ISR | ( | ) |
Value:
{ \
__asm__ __volatile__ ( \
/* Restore R0..R7 */ \
"ldm sp++, r0-r7\n\t" \
\
/* With the cooperative scheduler, as there is no context switch by interrupt, */ \
/* there is also no context restore. */ \
"rete" \
); \
}
Definition at line 548 of file GCC/AVR32_UC3/portmacro.h.
Referenced by vUSART_ISR().
| #define portFLOAT float |
Definition at line 92 of file GCC/AVR32_UC3/portmacro.h.
| #define portLONG long |
Definition at line 94 of file GCC/AVR32_UC3/portmacro.h.
Referenced by prvHighestPriorityPeekTask(), prvHighPriorityPeekTask(), prvLowPriorityPeekTask(), prvMediumPriorityPeekTask(), prvSendFrontAndBackTest(), prvUSART_ISR_NonNakedBehaviour(), vErrorChecks(), vMemCheckTask(), vStartAltGenericQueueTasks(), vStartGenericQueueTasks(), vStartQueuePeekTasks(), xAreAltGenericQueueTasksStillRunning(), xAreGenericQueueTasksStillRunning(), xAreQueuePeekTasksStillRunning(), and xSerialPortInitMinimal().
| #define portMAX_DELAY ( portTickType ) 0xffffffff |
Definition at line 110 of file GCC/AVR32_UC3/portmacro.h.
Referenced by prvFlashCoRoutine(), prvHighestPriorityPeekTask(), prvHighPriorityMutexTask(), prvHighPriorityPeekTask(), prvHookCoRoutine(), prvLowerPriorityNormallyEmptyTask(), prvLowerPriorityNormallyFullTask(), prvMediumPriorityPeekTask(), prvRecursiveMutexBlockingTask(), vListInitialise(), vListInsert(), vTaskPlaceOnEventList(), and xTaskCheckForTimeOut().
| #define portNOP | ( | ) | {__asm__ __volatile__ ("nop");} |
Definition at line 118 of file GCC/AVR32_UC3/portmacro.h.
| #define portRESTORE_CONTEXT | ( | ) |
| #define portRESTORE_CONTEXT_OS_INT | ( | ) |
Value:
{ \
__asm__ __volatile__ ( \
/* Restore R0..R7 */ \
"ldm sp++, r0-r7\n\t" \
\
/* With the cooperative scheduler, as there is no context switch by interrupt, */ \
/* there is also no context restore. */ \
"rete" \
); \
}
Definition at line 271 of file GCC/AVR32_UC3/portmacro.h.
Referenced by vTick().
| #define portRESTORE_CONTEXT_SCALL | ( | ) |
Value:
{ \
extern volatile unsigned portLONG ulCriticalNesting; \
extern volatile void *volatile pxCurrentTCB; \
\
/* Restore all registers */ \
\
/* Set SP to point to new stack */ \
__asm__ __volatile__ ( \
"mov r8, LO(%[pxCurrentTCB])\n\t" \
"orh r8, HI(%[pxCurrentTCB])\n\t" \
"ld.w r0, r8[0]\n\t" \
"ld.w sp, r0[0]" \
: \
: [pxCurrentTCB] "i" (&pxCurrentTCB) \
); \
\
/* Leave pxCurrentTCB variable access critical section */ \
portEXIT_CRITICAL(); \
\
__asm__ __volatile__ ( \
/* Restore ulCriticalNesting variable */ \
"ld.w r0, sp++\n\t" \
Definition at line 473 of file GCC/AVR32_UC3/portmacro.h.
Referenced by SCALLYield().
| #define portSAVE_CONTEXT_OS_INT | ( | ) |
Value:
{ \
/* Save R0..R7 */ \
__asm__ __volatile__ ("stm --sp, r0-r7"); \
\
/* With the cooperative scheduler, as there is no context switch by interrupt, */ \
/* there is also no context save. */ \
}
Definition at line 259 of file GCC/AVR32_UC3/portmacro.h.
Referenced by vTick().
| #define portSAVE_CONTEXT_SCALL | ( | ) |
| #define portSHORT short |
Definition at line 95 of file GCC/AVR32_UC3/portmacro.h.
Referenced by portTASK_FUNCTION(), and vStartAltPolledQueueTasks().
| #define portSTACK_GROWTH ( -1 ) |
Definition at line 115 of file GCC/AVR32_UC3/portmacro.h.
| #define portSTACK_TYPE unsigned portLONG |
Definition at line 96 of file GCC/AVR32_UC3/portmacro.h.
Referenced by prvAllocateTCBAndStack(), prvInitialiseTaskLists(), and pxPortInitialiseStack().
| #define portTASK_FUNCTION | ( | vFunction, | |||
| pvParameters | ) | void vFunction( void *pvParameters ) |
Definition at line 684 of file GCC/AVR32_UC3/portmacro.h.
| #define portTASK_FUNCTION_PROTO | ( | vFunction, | |||
| pvParameters | ) | void vFunction( void *pvParameters ) |
Definition at line 683 of file GCC/AVR32_UC3/portmacro.h.
| #define portTICK_RATE_MS ( ( portTickType ) 1000 / configTICK_RATE_HZ ) |
Definition at line 116 of file GCC/AVR32_UC3/portmacro.h.
Referenced by portTASK_FUNCTION(), prvFixedDelayCoRoutine(), vStartAltBlockingQueueTasks(), vStartBlockingQueueTasks(), and vStartSemaphoreTasks().
| #define portYIELD | ( | ) | {__asm__ __volatile__ ("scall");} |
Definition at line 680 of file GCC/AVR32_UC3/portmacro.h.
| #define TASK_DELAY_MIN | ( | x | ) | ( (x)*60*1000/portTICK_RATE_MS ) |
Definition at line 101 of file GCC/AVR32_UC3/portmacro.h.
| #define TASK_DELAY_MS | ( | x | ) | ( (x) /portTICK_RATE_MS ) |
Definition at line 99 of file GCC/AVR32_UC3/portmacro.h.
| #define TASK_DELAY_S | ( | x | ) | ( (x)*1000 /portTICK_RATE_MS ) |
Definition at line 100 of file GCC/AVR32_UC3/portmacro.h.
| typedef unsigned portLONG portTickType |
Definition at line 109 of file GCC/AVR32_UC3/portmacro.h.
| mov HI | ( | % | [ulCriticalNesting] | ) |
| mov LO | ( | % | [ulCriticalNesting] | ) |
| void* pvPortRealloc | ( | void * | pv, | |
| size_t | xSize | |||
| ) |
Definition at line 207 of file GCC/AVR32_UC3/port.c.
00208 { 00209 void *pvReturn; 00210 00211 vTaskSuspendAll(); 00212 { 00213 pvReturn = realloc( pv, xWantedSize ); 00214 } 00215 xTaskResumeAll(); 00216 00217 return pvReturn; 00218 }
| void vPortEnterCritical | ( | void | ) |
Definition at line 262 of file GCC/AVR32_UC3/port.c.
00263 { 00264 /* Disable interrupts */ 00265 portDISABLE_INTERRUPTS(); 00266 00267 /* Now interrupts are disabled ulCriticalNesting can be accessed 00268 directly. Increment ulCriticalNesting to keep a count of how many times 00269 portENTER_CRITICAL() has been called. */ 00270 ulCriticalNesting++; 00271 }
| void vPortExitCritical | ( | void | ) |
Definition at line 274 of file GCC/AVR32_UC3/port.c.
00275 { 00276 if(ulCriticalNesting > portNO_CRITICAL_NESTING) 00277 { 00278 ulCriticalNesting--; 00279 if( ulCriticalNesting == portNO_CRITICAL_NESTING ) 00280 { 00281 /* Enable all interrupt/exception. */ 00282 portENABLE_INTERRUPTS(); 00283 } 00284 } 00285 }
Definition at line 503 of file GCC/AVR32_UC3/portmacro.h.
Definition at line 503 of file GCC/AVR32_UC3/portmacro.h.
Definition at line 503 of file GCC/AVR32_UC3/portmacro.h.
| mov r8 |
Definition at line 497 of file GCC/AVR32_UC3/portmacro.h.
| mov r0 n t sub * n t ldm r8 lr n t ld w r7 [-8*4] n t st w r0 n t ld w r7 [-7*4] n t st w r0 n t ldm r0 r7 n t sub * n t rets |
Definition at line 503 of file GCC/AVR32_UC3/portmacro.h.
| mov r0 n t sub * n t ldm r8 lr n t ld w r7 [-8*4] n t st w r0 n t ld w r7 [-7*4] n t st w r0 n t ldm r0 r7 n t sub sp |
Definition at line 503 of file GCC/AVR32_UC3/portmacro.h.
1.5.5