Index: firmware/App/Tasks/TaskPriority.c =================================================================== diff -u -r090cfb22a7c0b4738299c3fb411ca77aaba8d968 -ra9983d3e6b07e7c927fab3d16e80b715594fe221 --- firmware/App/Tasks/TaskPriority.c (.../TaskPriority.c) (revision 090cfb22a7c0b4738299c3fb411ca77aaba8d968) +++ firmware/App/Tasks/TaskPriority.c (.../TaskPriority.c) (revision a9983d3e6b07e7c927fab3d16e80b715594fe221) @@ -14,20 +14,22 @@ * @date (original) 05-Aug-2024 * ***************************************************************************/ - -#include "gio.h" - -//#include "ConductivitySensors.h" -//#include "DrainPump.h" -#include "FPGA.h" -//#include "Heaters.h" -//#include "InternalADC.h" -//#include "Pressures.h" -#include "TaskPriority.h" -//#include "TemperatureSensors.h" -//#include "Valves.h" -#include "WatchdogMgmt.h" +#include "gio.h" + +#include "Conductivity.h" +#include "DialysatePumps.h" +#include "FPGA.h" +#include "Heaters.h" +#include "InternalADC.h" +#include "Level.h" +#include "ModeGenDialysate.h" +#include "Pressure.h" +#include "TaskPriority.h" +#include "Temperature.h" +#include "Valves.h" +#include "WatchdogMgmt.h" + /** * @addtogroup TaskPriority * @{ @@ -40,64 +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 - //execPressures(); - // 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(); - // Conductivity sensors read - //execConductivitySensors(); - - // Control valves - //execValves(); + // Read/write Conductivity sensors + execConductivity(); - // Monitor accelerometer - //execAccel(); + // Control valves + execValves(); - // Monitor RO pump - //execROPumpMonitor(); - - // Monitor drain pump - //execDrainPumpMonitor(); - - // Heaters monitor - //execHeatersMonitor(); + // Monitor dialysate pump + execDialysatePumpMonitor(); - // Second pass for FPGA + // 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 -} +} -/**@}*/ +/**@}*/