Index: firmware/App/Tasks/TaskPriority.c =================================================================== diff -u -rcef6b0392becf60c69cf4e517701ba22642f072a -r37a9fd8f15e413db5337371a7d1a1cb65567af7c --- firmware/App/Tasks/TaskPriority.c (.../TaskPriority.c) (revision cef6b0392becf60c69cf4e517701ba22642f072a) +++ firmware/App/Tasks/TaskPriority.c (.../TaskPriority.c) (revision 37a9fd8f15e413db5337371a7d1a1cb65567af7c) @@ -1,17 +1,17 @@ /************************************************************************** * -* Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. +* Copyright (c) 2019-2022 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * -* @file TaskPriority.c +* @file TaskPriority.c * -* @author (last) Sean Nash -* @date (last) 14-Oct-2020 +* @author (last) Darren Cox +* @date (last) 10-Mar-2022 * -* @author (original) Dara Navaei -* @date (original) 05-Nov-2019 +* @author (original) Dara Navaei +* @date (original) 05-Nov-2019 * ***************************************************************************/ @@ -25,13 +25,14 @@ #include "DialInFlow.h" #include "DialOutFlow.h" #include "FluidLeak.h" -#include "FPGA.h" +#include "FPGA.h" +#include "NVDataMgmt.h" #include "InternalADC.h" #include "SyringePump.h" #include "SystemComm.h" #include "Valves.h" #include "WatchdogMgmt.h" -#include "TaskPriority.h" +#include "TaskPriority.h" /** * @addtogroup TaskPriority @@ -43,7 +44,7 @@ * The taskPriority function handles the scheduled Priority Task interrupt. * Calls the executive functions for FPGA, pumps, valves, and buttons. * @details Inputs: none - * @details Outputs: Executive for the FPGA, pumps, valves, and buttons called. + * @details Outputs: Executives running in priority task are called. * @return none *************************************************************************/ void taskPriority( void ) @@ -58,10 +59,13 @@ if ( TRUE == uiCommunicated() ) #endif { -#ifndef BOARD_WITH_NO_HARDWARE // 1st pass for FPGA - execFPGAIn(); + execFPGAIn(); +#ifndef BOARD_WITH_NO_HARDWARE + // Verify processor clock speed against FPGA clock + execFPGAClockSpeedTest(); + #ifndef CAN_TEST // Monitor and process buttons execButtons(); @@ -72,10 +76,11 @@ // Monitor air trap level sensors execAirTrapMonitor(); -#ifndef DISABLE_SYRINGE_PUMP - // Control/Monitor syringe pump - execSyringePump(); -#endif + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_SYRINGE_PUMP ) != SW_CONFIG_ENABLE_VALUE ) + { + // Control/Monitor syringe pump + execSyringePump(); + } // Monitor blood pump and flow execBloodFlowMonitor(); @@ -95,18 +100,20 @@ // Monitor air bubble detectors execBubbles(); -#ifndef DISABLE_ACCELS - // Monitor accelerometer - execAccel(); +#ifndef _RELEASE_ + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_ACCELEROMETERS ) != SW_CONFIG_ENABLE_VALUE ) #endif -#ifndef DISABLE_3WAY_VALVES + { + // Monitor accelerometer + execAccel(); + } + // Exec and monitor valves execValves(); #endif -#endif +#endif // 2nd pass for FPGA execFPGAOut(); -#endif } // Check in with watchdog manager