Index: firmware/App/Tasks/TaskPriority.c =================================================================== diff -u -r9bd502d3342764c0847258a81a212b446172a8b4 -ra9983d3e6b07e7c927fab3d16e80b715594fe221 --- firmware/App/Tasks/TaskPriority.c (.../TaskPriority.c) (revision 9bd502d3342764c0847258a81a212b446172a8b4) +++ firmware/App/Tasks/TaskPriority.c (.../TaskPriority.c) (revision a9983d3e6b07e7c927fab3d16e80b715594fe221) @@ -15,17 +15,20 @@ * ***************************************************************************/ -#include "gio.h" - -#include "Conductivity.h" -#include "FPGA.h" -//#include "Heaters.h" +#include "gio.h" + +#include "Conductivity.h" +#include "DialysatePumps.h" +#include "FPGA.h" +#include "Heaters.h" #include "InternalADC.h" -#include "Pressure.h" -#include "TaskPriority.h" -//#include "TemperatureSensors.h" -#include "Valves.h" -#include "WatchdogMgmt.h" +#include "Level.h" +#include "ModeGenDialysate.h" +#include "Pressure.h" +#include "TaskPriority.h" +#include "Temperature.h" +#include "Valves.h" +#include "WatchdogMgmt.h" /** * @addtogroup TaskPriority @@ -39,61 +42,65 @@ #define SET_TASK_OFF() { mibspiREG3->PC3 &= ~TASK_TIMING_TEST_PIN_SPI1_PORT_MASK; } #endif -/*********************************************************************//** - * @brief - * The taskPriority function handles the scheduled priority task interrupt. - * Calls the executive functions for FPGA, pumps, valves, and buttons. - * @details \b Inputs: none +/*********************************************************************//** + * @brief + * The taskPriority function handles the scheduled priority task interrupt. + * Calls the executive functions for FPGA, pumps, valves, and buttons. + * @details \b Inputs: none * @details \b Outputs: Executive for the FPGA, pumps, valves, and buttons called. - * @note This task runs every 10 ms interval. - *************************************************************************/ -void taskPriority( void ) -{ + * @note This task runs every 10 ms interval. + *************************************************************************/ +void taskPriority( void ) +{ #ifdef TASK_TIMING_OUTPUT_ENABLED // SET_TASK_ON(); // TODO - uncomment and define TASK_TIMING_OUTPUT_ENABLED to monitor this tasks timing #endif #ifndef BOARD_WITH_NO_HARDWARE - // First pass for FPGA + // First pass for FPGA execFPGA( TRUE ); - - // Monitor internal ADC channels - //execInternalADC(); - - // Monitor pressures - execPressureSensor(); - // Temperature sensors read - //execTemperatureSensors(); + //TODO : Enable later Temperature, Conductivity, Heaters, Internal ADC and FPGA clock speed + // Monitor internal ADC channels + //execInternalADC(); + //Monitor Level sensor + execLevels(); + + // Monitor pressures + execPressureSensor(); + + // Monitor temperatures + execTemperatureSensors(); + // Verify the processor clock speed against the FPGA clock //execFPGAClockSpeedTest(); // Read/write Conductivity sensors execConductivity(); - - // Control valves - execValves(); - // Monitor RO pump - //execROPumpMonitor(); - - // Monitor drain pump - //execDrainPumpMonitor(); - - // Heaters monitor - //execHeatersMonitor(); + // Control valves + execValves(); - // Second pass for FPGA + // Monitor dialysate pump + execDialysatePumpMonitor(); + + // Heaters monitor + execHeatersMonitor(); + + // Dialysate generation monitor + execGenDialysateMonitor(); + + // Second pass for FPGA execFPGA( FALSE ); -#endif - - // Check in with watchdog manager - checkInWithWatchdogMgmt( TASK_PRIORITY ); - +#endif + + // Check in with watchdog manager + checkInWithWatchdogMgmt( TASK_PRIORITY ); + #ifdef TASK_TIMING_OUTPUT_ENABLED // SET_TASK_OFF(); // TODO - uncomment and define TASK_TIMING_OUTPUT_ENABLED to monitor this tasks timing #endif -} +} -/**@}*/ +/**@}*/