Index: firmware/App/Tasks/TaskPriority.c =================================================================== diff -u -rde5a0d43bdef611d963d11855bc958a8d8899a09 -r4459be59bdc2896b44bcf6cd42d2762190e23c16 --- firmware/App/Tasks/TaskPriority.c (.../TaskPriority.c) (revision de5a0d43bdef611d963d11855bc958a8d8899a09) +++ firmware/App/Tasks/TaskPriority.c (.../TaskPriority.c) (revision 4459be59bdc2896b44bcf6cd42d2762190e23c16) @@ -14,29 +14,40 @@ * @date (original) 05-Nov-2019 * ***************************************************************************/ - -//#include "gio.h" - -#include "InternalADC.h" + +#include "Accel.h" #include "BloodFlow.h" -#include "Buttons.h" +#include "Buttons.h" +#include "CPLD.h" #include "DialInFlow.h" #include "DialOutFlow.h" #include "FPGA.h" +#include "InternalADC.h" #include "SystemComm.h" #include "WatchdogMgmt.h" #include "TaskPriority.h" -/************************************************************************* - * @brief taskPriority +/** + * @addtogroup TaskPriority + * @{ + */ + +/*********************************************************************//** + * @brief * The taskPriority function handles the scheduled Priority Task interrupt. * Calls the executive functions for FPGA, pumps, valves, and buttons. * @details * Inputs : none - * Outputs : Executive for the FPGA, pumps, valves, and buttons called. + * Outputs : Executive for the FPGA, pumps, valves, and buttons called. + * @return none *************************************************************************/ void taskPriority( void ) { +#ifdef TASK_TIMING_OUTPUT_ENABLED + // set GPIO high to indicate priority task has begun executing + setCPLDLampRed( PIN_SIGNAL_HIGH ); +#endif + // prevent most processing until UI has started communicating #ifndef SIMULATE_UI if ( TRUE == uiCommunicated() ) @@ -59,16 +70,24 @@ execDialInFlowMonitor(); // monitor dialysate outlet pump and load cells - execDialOutFlowMonitor(); + execDialOutFlowMonitor(); + +#ifndef DISABLE_ACCELS + // monitor accelerometer + execAccel(); +#endif #endif // 2nd pass for FPGA execFPGAOut(); } // check in with watchdog manager checkInWithWatchdogMgmt( TASK_PRIORITY ); - - // toggle GPIO to indicate priority task has executed -// gioToggleBit( gioPORTB, 3 ); + +#ifdef TASK_TIMING_OUTPUT_ENABLED + // set GPIO low to indicate priority task has finished executing + setCPLDLampRed( PIN_SIGNAL_LOW ); +#endif } - + +/**@}*/