/************************************************************************** * * Copyright (c) 2019-2019 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 * * @date 19-Sep-2019 * @author S. Nash * * @brief Priority task handler. * **************************************************************************/ //#include "gio.h" #include "InternalADC.h" #include "BloodFlow.h" #include "Buttons.h" #include "DialInFlow.h" #include "DialOutUF.h" #include "FPGA.h" #include "SystemComm.h" #include "WatchdogMgmt.h" #include "TaskPriority.h" /************************************************************************* * @brief taskPriority * 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. *************************************************************************/ void taskPriority( void ) { // prevent most processing until UI has started communicating if ( TRUE == uiCommunicated() ) { // 1st pass for FPGA execFPGAIn(); // monitor and process buttons execButtons(); // monitor internal ADC channels execInternalADC(); // monitor blood pump and flow execBloodFlowMonitor(); // monitor dialysate inlet pump and flow execDialInFlowMonitor(); // monitor dialysate outlet pump and reservoir load cells // execDialOutUFMonitor(); // 2nd pass for FPGA execFPGAOut(); } // check in with watchdog manager checkInWithWatchdogMgmt( TASK_PRIORITY ); // toggle GPIO to indicate priority task has executed // gioToggleBit( gioPORTB, 3 ); }