extern void vPortYield( void );\r
extern void vPortStartFirstTask( void );\r
\r
+static XIntc xInterruptController;\r
+\r
/* \r
* Initialise the stack of a task to look exactly as if a call to \r
* portSAVE_CONTEXT had been made.\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vPortISRHandler( void *DeviceId )\r
+void vPortISRHandler( void *vNullDoNotUse )\r
{\r
Xuint32 IntrStatus;\r
Xuint32 IntrMask = 1;\r
}\r
}\r
}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vPortSetupInterruptController( void )\r
+{\r
+extern void vPortISRWrapper( void );\r
+\r
+ XExc_mDisableExceptions( XEXC_NON_CRITICAL );\r
+ XExc_Init();\r
+ XExc_RegisterHandler( XEXC_ID_NON_CRITICAL_INT, (XExceptionHandler)vPortISRWrapper, NULL );\r
+ XIntc_Initialize( &xInterruptController, XPAR_OPB_INTC_0_DEVICE_ID );\r
+ XIntc_Start( &xInterruptController, XIN_REAL_MODE );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+portBASE_TYPE xPortInstallInterruptHandler( unsigned portCHAR ucInterruptID, XInterruptHandler pxHandler, void *pvCallBackRef )\r
+{\r
+portBASE_TYPE xReturn = pdFAIL;\r
+\r
+ if( XST_SUCCESS == XIntc_Connect( &xInterruptController, ucInterruptID, pxHandler, pvCallBackRef ) )\r
+ {\r
+ XIntc_Enable( &xInterruptController, ucInterruptID );\r
+ xReturn = pdPASS;\r
+ }\r
+\r
+ return xReturn; \r
+}\r
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters )\r
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )\r
\r
+/* Port specific initialisation function. */\r
+void vPortSetupInterruptController( void );\r
+portBASE_TYPE xPortInstallInterruptHandler( unsigned portCHAR ucInterruptID, XInterruptHandler pxHandler, void *pvCallBackRef );\r
+\r
#ifdef __cplusplus\r
}\r
#endif\r