uc-sdk
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
portmacro.h File Reference
#include <plib.h>

Go to the source code of this file.

Macros

#define portCHAR   char
 
#define portFLOAT   float
 
#define portDOUBLE   double
 
#define portLONG   long
 
#define portSHORT   short
 
#define portSTACK_TYPE   unsigned long
 
#define portBASE_TYPE   long
 
#define portMAX_DELAY   ( portTickType ) 0xffffffff
 
#define portBYTE_ALIGNMENT   8
 
#define portSTACK_GROWTH   -1
 
#define portTICK_RATE_MS   ( ( portTickType ) 1000 / configTICK_RATE_HZ )
 
#define portIPL_SHIFT   ( 10 )
 
#define portALL_IPL_BITS   ( 0x3f << portIPL_SHIFT )
 
#define portSW0_BIT   ( 0x01 << 8 )
 
#define portDISABLE_INTERRUPTS()
 
#define portENABLE_INTERRUPTS()
 
#define portCRITICAL_NESTING_IN_TCB   1
 
#define portENTER_CRITICAL()   vTaskEnterCritical()
 
#define portEXIT_CRITICAL()   vTaskExitCritical()
 
#define portSET_INTERRUPT_MASK_FROM_ISR()   uxPortSetInterruptMaskFromISR()
 
#define portCLEAR_INTERRUPT_MASK_FROM_ISR(uxSavedStatusRegister)   vPortClearInterruptMaskFromISR( uxSavedStatusRegister )
 
#define portYIELD()
 
#define portNOP()   asm volatile ( "nop" )
 
#define portTASK_FUNCTION_PROTO(vFunction, pvParameters)   void vFunction( void *pvParameters ) __attribute__((noreturn))
 
#define portTASK_FUNCTION(vFunction, pvParameters)   void vFunction( void *pvParameters )
 
#define portEND_SWITCHING_ISR(xSwitchRequired)
 

Typedefs

typedef unsigned portLONG portTickType
 

Functions

void vTaskEnterCritical (void)
 
void vTaskExitCritical (void)
 
unsigned portBASE_TYPE uxPortSetInterruptMaskFromISR ()
 
void vPortClearInterruptMaskFromISR (unsigned portBASE_TYPE)
 

Macro Definition Documentation

#define portALL_IPL_BITS   ( 0x3f << portIPL_SHIFT )

Definition at line 100 of file portmacro.h.

#define portBASE_TYPE   long

Definition at line 81 of file portmacro.h.

#define portBYTE_ALIGNMENT   8

Definition at line 93 of file portmacro.h.

#define portCHAR   char

Definition at line 75 of file portmacro.h.

#define portCLEAR_INTERRUPT_MASK_FROM_ISR (   uxSavedStatusRegister)    vPortClearInterruptMaskFromISR( uxSavedStatusRegister )

Definition at line 133 of file portmacro.h.

#define portCRITICAL_NESTING_IN_TCB   1

Definition at line 126 of file portmacro.h.

#define portDISABLE_INTERRUPTS ( )
Value:
{ \
unsigned portLONG ulStatus; \
\
/* Mask interrupts at and below the kernel interrupt priority. */ \
ulStatus = _CP0_GET_STATUS(); \
_CP0_SET_STATUS( ulStatus ); \
}

Definition at line 103 of file portmacro.h.

#define portDOUBLE   double

Definition at line 77 of file portmacro.h.

#define portENABLE_INTERRUPTS ( )
Value:
{ \
unsigned portLONG ulStatus; \
\
/* Unmask all interrupts. */ \
ulStatus = _CP0_GET_STATUS(); \
ulStatus &= ~portALL_IPL_BITS; \
_CP0_SET_STATUS( ulStatus ); \
}

Definition at line 113 of file portmacro.h.

#define portEND_SWITCHING_ISR (   xSwitchRequired)
Value:
if( xSwitchRequired ) \
{ \
portYIELD(); \
}

Definition at line 159 of file portmacro.h.

#define portENTER_CRITICAL ( )    vTaskEnterCritical()

Definition at line 127 of file portmacro.h.

#define portEXIT_CRITICAL ( )    vTaskExitCritical()

Definition at line 128 of file portmacro.h.

#define portFLOAT   float

Definition at line 76 of file portmacro.h.

#define portIPL_SHIFT   ( 10 )

Definition at line 99 of file portmacro.h.

#define portLONG   long

Definition at line 78 of file portmacro.h.

#define portMAX_DELAY   ( portTickType ) 0xffffffff

Definition at line 88 of file portmacro.h.

#define portNOP ( )    asm volatile ( "nop" )

Definition at line 150 of file portmacro.h.

#define portSET_INTERRUPT_MASK_FROM_ISR ( )    uxPortSetInterruptMaskFromISR()

Definition at line 132 of file portmacro.h.

#define portSHORT   short

Definition at line 79 of file portmacro.h.

#define portSTACK_GROWTH   -1

Definition at line 94 of file portmacro.h.

#define portSTACK_TYPE   unsigned long

Definition at line 80 of file portmacro.h.

#define portSW0_BIT   ( 0x01 << 8 )

Definition at line 101 of file portmacro.h.

#define portTASK_FUNCTION (   vFunction,
  pvParameters 
)    void vFunction( void *pvParameters )

Definition at line 156 of file portmacro.h.

#define portTASK_FUNCTION_PROTO (   vFunction,
  pvParameters 
)    void vFunction( void *pvParameters ) __attribute__((noreturn))

Definition at line 155 of file portmacro.h.

#define portTICK_RATE_MS   ( ( portTickType ) 1000 / configTICK_RATE_HZ )

Definition at line 95 of file portmacro.h.

#define portYIELD ( )
Value:
{ \
unsigned portLONG ulStatus; \
\
/* Trigger software interrupt. */ \
ulStatus = _CP0_GET_CAUSE(); \
ulStatus |= portSW0_BIT; \
_CP0_SET_CAUSE( ulStatus ); \
}

Definition at line 139 of file portmacro.h.

Typedef Documentation

typedef unsigned portLONG portTickType

Definition at line 87 of file portmacro.h.

Function Documentation

unsigned portBASE_TYPE uxPortSetInterruptMaskFromISR ( )

Definition at line 193 of file port.c.

void vPortClearInterruptMaskFromISR ( unsigned  portBASE_TYPE)

Definition at line 205 of file port.c.

void vTaskEnterCritical ( void  )
void vTaskExitCritical ( void  )