Line 81... |
Line 81... |
#define portBYTE_ALIGNMENT 4
|
#define portBYTE_ALIGNMENT 4
|
#define portCRITICAL_NESTING_IN_TCB 1
|
#define portCRITICAL_NESTING_IN_TCB 1
|
#define portINSTRUCTION_SIZE ( ( portSTACK_TYPE ) 4 )
|
#define portINSTRUCTION_SIZE ( ( portSTACK_TYPE ) 4 )
|
#define portNO_CRITICAL_SECTION_NESTING ( ( portSTACK_TYPE ) 0 )
|
#define portNO_CRITICAL_SECTION_NESTING ( ( portSTACK_TYPE ) 0 )
|
|
|
#define portYIELD_FROM_ISR() vTaskSwitchContext()
|
#define portYIELD_FROM_ISR() portYIELD()
|
#define portYIELD() { \
|
#define portYIELD() { \
|
__asm__ __volatile__ ( "l.sw -4(r1), r11" ); \
|
__asm__ __volatile__ ( "l.nop " ); \
|
__asm__ __volatile__ ( "l.addi r11, r0, 0x0FCC" ); \
|
|
__asm__ __volatile__ ( "l.sys 0x0FCC" ); \
|
__asm__ __volatile__ ( "l.sys 0x0FCC" ); \
|
__asm__ __volatile__ ( "l.nop " ); \
|
__asm__ __volatile__ ( "l.nop " ); \
|
}
|
}
|
#define portNOP() __asm__ __volatile__ ( "l.nop" )
|
#define portNOP() __asm__ __volatile__ ( "l.nop" )
|
|
|
|
|
/*
|
|
* naked attribute is ignored or32-elf-gcc 4.5.1-or32-1.0rc1
|
|
* use assemble routines in portasm.S
|
|
*/
|
|
#if 0
|
|
extern void vPortDisableInterrupts( void ) __attribute__ ((__naked__));
|
|
extern void vPortEnableInterrupts( void ) __attribute__ ((__naked__));
|
|
#else
|
|
void vPortDisableInterrupts( void );
|
void vPortDisableInterrupts( void );
|
void vPortEnableInterrupts( void );
|
void vPortEnableInterrupts( void );
|
#endif
|
|
|
|
#define portDISABLE_INTERRUPTS() vPortDisableInterrupts()
|
#define portDISABLE_INTERRUPTS() vPortDisableInterrupts()
|
#define portENABLE_INTERRUPTS() vPortEnableInterrupts()
|
#define portENABLE_INTERRUPTS() vPortEnableInterrupts()
|
|
|
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
|
|
|
|
// Critical section handling.
|
// Critical section handling.
|
// switch supervisormode, disable tick interrupt and all external interrupt, switch back usermode
|
extern void vTaskEnterCritical( void );
|
#define portENTER_CRITICAL() { \
|
extern void vTaskExitCritical( void );
|
__asm__ __volatile__ ( "l.sw -4(r1), r11" ); \
|
#define portENTER_CRITICAL() vTaskEnterCritical()
|
__asm__ __volatile__ ( "l.addi r11, r0, 0x0FCE" ); \
|
#define portEXIT_CRITICAL() vTaskExitCritical()
|
__asm__ __volatile__ ( "l.sys 0x0FCE" ); \
|
|
__asm__ __volatile__ ( "l.nop " ); \
|
|
}
|
|
|
|
// switch supervisormode, enable tick interrupt and all external interrupt, switch back usermode
|
|
#define portEXIT_CRITICAL() { \
|
|
__asm__ __volatile__ ( "l.sw -4(r1), r11" ); \
|
|
__asm__ __volatile__ ( "l.addi r11, r0, 0x0FCF" ); \
|
|
__asm__ __volatile__ ( "l.sys 0x0FCF" ); \
|
|
__asm__ __volatile__ ( "l.nop " ); \
|
|
}
|
|
|
|
/* Task function macros as described on the FreeRTOS.org WEB site. */
|
/* Task function macros as described on the FreeRTOS.org WEB site. */
|
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters )
|
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters )
|
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )
|
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )
|
|
|
Line 240... |
Line 216... |
" l.addi r1, r1, 128 \n\t" \
|
" l.addi r1, r1, 128 \n\t" \
|
" l.rfe \n\t" \
|
" l.rfe \n\t" \
|
" l.nop \n\t" \
|
" l.nop \n\t" \
|
);
|
);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
#endif /* PORTMACRO_H */
|
#endif /* PORTMACRO_H */
|
|
|
No newline at end of file
|
No newline at end of file
|