Index: firmware/App/Services/Interrupts.c =================================================================== diff -u -r9b262ba08e3180f121c3cf19d8d25e565183f87d -rade19b8aa4c3b60cdda4028871ef009b01368948 --- firmware/App/Services/Interrupts.c (.../Interrupts.c) (revision 9b262ba08e3180f121c3cf19d8d25e565183f87d) +++ firmware/App/Services/Interrupts.c (.../Interrupts.c) (revision ade19b8aa4c3b60cdda4028871ef009b01368948) @@ -16,6 +16,7 @@ **************************************************************************/ #include "can.h" +#include "rti.h" #include "sci.h" #include "sys_dma.h" @@ -24,6 +25,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 @@ -49,7 +53,7 @@ /************************************************************************* - * @brief phantomInterrupt + * @brief * The phantomInterrupt function handles phantom interrupts. * @details * Inputs : none @@ -63,7 +67,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 @@ -81,7 +120,7 @@ } /************************************************************************* - * @brief canErrorNotification + * @brief * The canErrorNotification function handles CAN error notifications. * @details * Inputs : none @@ -145,7 +184,7 @@ } /************************************************************************* - * @brief sciNotification + * @brief * The sciNotification function handles UART communication error interrupts. \n * Frame and Over-run errors are handled. * @details @@ -215,7 +254,7 @@ } /************************************************************************* - * @brief dmaGroupANotification + * @brief * The dmaGroupANotification function handles communication DMA interrupts. * @details * Inputs : none