mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
PPC405 work in progress.
This commit is contained in:
parent
ebcac1c4b5
commit
39b68e7fc5
|
@ -71,6 +71,8 @@ extern void vPortTickISR( void );
|
||||||
extern void vPortYield( void );
|
extern void vPortYield( void );
|
||||||
extern void vPortStartFirstTask( void );
|
extern void vPortStartFirstTask( void );
|
||||||
|
|
||||||
|
static XIntc xInterruptController;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialise the stack of a task to look exactly as if a call to
|
* Initialise the stack of a task to look exactly as if a call to
|
||||||
* portSAVE_CONTEXT had been made.
|
* portSAVE_CONTEXT had been made.
|
||||||
|
@ -228,7 +230,7 @@ static unsigned portLONG ulTicks = 0;
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
void vPortISRHandler( void *DeviceId )
|
void vPortISRHandler( void *vNullDoNotUse )
|
||||||
{
|
{
|
||||||
Xuint32 IntrStatus;
|
Xuint32 IntrStatus;
|
||||||
Xuint32 IntrMask = 1;
|
Xuint32 IntrMask = 1;
|
||||||
|
@ -278,3 +280,29 @@ XIntc_Config *CfgPtr;// = xInterruptController.CfgPtr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
void vPortSetupInterruptController( void )
|
||||||
|
{
|
||||||
|
extern void vPortISRWrapper( void );
|
||||||
|
|
||||||
|
XExc_mDisableExceptions( XEXC_NON_CRITICAL );
|
||||||
|
XExc_Init();
|
||||||
|
XExc_RegisterHandler( XEXC_ID_NON_CRITICAL_INT, (XExceptionHandler)vPortISRWrapper, NULL );
|
||||||
|
XIntc_Initialize( &xInterruptController, XPAR_OPB_INTC_0_DEVICE_ID );
|
||||||
|
XIntc_Start( &xInterruptController, XIN_REAL_MODE );
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
portBASE_TYPE xPortInstallInterruptHandler( unsigned portCHAR ucInterruptID, XInterruptHandler pxHandler, void *pvCallBackRef )
|
||||||
|
{
|
||||||
|
portBASE_TYPE xReturn = pdFAIL;
|
||||||
|
|
||||||
|
if( XST_SUCCESS == XIntc_Connect( &xInterruptController, ucInterruptID, pxHandler, pvCallBackRef ) )
|
||||||
|
{
|
||||||
|
XIntc_Enable( &xInterruptController, ucInterruptID );
|
||||||
|
xReturn = pdPASS;
|
||||||
|
}
|
||||||
|
|
||||||
|
return xReturn;
|
||||||
|
}
|
||||||
|
|
|
@ -110,6 +110,10 @@ void vPortYield( void );
|
||||||
#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 )
|
||||||
|
|
||||||
|
/* Port specific initialisation function. */
|
||||||
|
void vPortSetupInterruptController( void );
|
||||||
|
portBASE_TYPE xPortInstallInterruptHandler( unsigned portCHAR ucInterruptID, XInterruptHandler pxHandler, void *pvCallBackRef );
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue