Index: firmware/App/Services/Interrupts.c =================================================================== diff -u -r5bec978fa9cce89bbf8c559f0844b7528a10c0d1 -rb948375777d4eb9c766befdcfde1e717a37977a8 --- firmware/App/Services/Interrupts.c (.../Interrupts.c) (revision 5bec978fa9cce89bbf8c559f0844b7528a10c0d1) +++ firmware/App/Services/Interrupts.c (.../Interrupts.c) (revision b948375777d4eb9c766befdcfde1e717a37977a8) @@ -17,6 +17,7 @@ #include #include "can.h" +#include "rti.h" #include "sci.h" #include "sys_dma.h" @@ -25,6 +26,9 @@ #include "Interrupts.h" #include "FPGA.h" #include "SystemComm.h" +#include "TaskGeneral.h" +#include "TaskPriority.h" +#include "TaskTimer.h" #ifdef DEBUG_ENABLED #include "SystemCommMessages.h" #endif @@ -50,7 +54,7 @@ /************************************************************************* - * @brief phantomInterrupt + * @brief * The phantomInterrupt function handles phantom interrupts. * @details * Inputs : none @@ -64,7 +68,42 @@ } /************************************************************************* - * @brief canMessageNotification + * @brief + * The rtiNotification function handles real-time interrupt notifications. + * @details + * Inputs : none + * Outputs : RTI notification handled. + * @param notification : Which RTI timer caused this interrupt. + * @return none + *************************************************************************/ +void rtiNotification(uint32 notification) +{ + switch ( notification ) + { + case rtiNOTIFICATION_COMPARE0: + taskTimer(); + break; + + case rtiNOTIFICATION_COMPARE1: + taskPriority(); + break; + + case rtiNOTIFICATION_COMPARE2: + // do nothing - unused at this time + break; + + case rtiNOTIFICATION_COMPARE3: + taskGeneral(); + break; + + default: + // TODO - s/w fault? + break; + } +} + +/************************************************************************* + * @brief * The canMessageNotification function handles CAN message notifications. * @details * Inputs : none @@ -82,7 +121,7 @@ } /************************************************************************* - * @brief canErrorNotification + * @brief * The canErrorNotification function handles CAN error notifications. * @details * Inputs : none @@ -146,7 +185,7 @@ } /************************************************************************* - * @brief sciNotification + * @brief * The sciNotification function handles UART communication error interrupts. \n * Frame and Over-run errors are handled. * @details @@ -216,7 +255,7 @@ } /************************************************************************* - * @brief dmaGroupANotification + * @brief * The dmaGroupANotification function handles communication DMA interrupts. * @details * Inputs : none