Index: firmware/App/Drivers/GLXferPump.c =================================================================== diff -u -r285b5d82539c96524c93703d52a66fff76fb64fc -r395522dffef1348e176564925656012f529c1910 --- firmware/App/Drivers/GLXferPump.c (.../GLXferPump.c) (revision 285b5d82539c96524c93703d52a66fff76fb64fc) +++ firmware/App/Drivers/GLXferPump.c (.../GLXferPump.c) (revision 395522dffef1348e176564925656012f529c1910) @@ -1,17 +1,17 @@ /************************************************************************** * -* Copyright (c) 2024-2024 Diality Inc. - All Rights Reserved. +* Copyright (c) 2024-2026 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 GLXferPump.c * -* @author (last) Sean -* @date (last) 17-Sep-2024 +* @author (last) Dara Navaei +* @date (last) 03-Sep-2025 * -* @author (original) Sean -* @date (original) 17-Sep-2024 +* @author (original) Sean Nash +* @date (original) 19-Sep-2024 * ***************************************************************************/ @@ -28,6 +28,8 @@ // ********** private definitions ********** +#define AIR_PUMP_PWM_TIME 20 ///< Time (in 10ns increments) per PWM register count for the air pump = 20 kHz. + // ********** private data ********** static U08 currentAirPumpMotorPowerLevel; ///< Current air pump motor state: 0=off, 1..255=power level. @@ -45,7 +47,8 @@ void initGasLiqXferPumpDriver(void) { currentAirPumpMotorPowerLevel = AIR_PUMP_MOTOR_OFF; - setAirPumpMotorPowerLevel( currentAirPumpMotorPowerLevel ); + setH12AirPumpMotorPowerLevel( currentAirPumpMotorPowerLevel ); + setH12AirPumpMotorPWMCntTime( AIR_PUMP_PWM_TIME ); } /*********************************************************************//** @@ -64,7 +67,7 @@ if ( power != currentAirPumpMotorPowerLevel ) { SEND_EVENT_WITH_2_U32_DATA( TD_EVENT_AIR_PUMP_ON_OFF, (U32)currentAirPumpMotorPowerLevel, (U32)power ); - setAirPumpMotorPowerLevel( power ); + setH12AirPumpMotorPowerLevel( power ); currentAirPumpMotorPowerLevel = power; } } @@ -88,38 +91,5 @@ *************************************************************************/ -/*********************************************************************//** - * @brief - * The testSetAirPump function sets the air pump to a given state (on/off). - * @details \b Inputs: none - * @details \b Outputs: currentAirPumpMotorPowerLevel - * @param message set message from Dialin which includes the state to set - * the air pump to. - * @return TRUE if set request is successful, FALSE if not - *************************************************************************/ -BOOL testSetAirPump( MESSAGE_T *message ) -{ - BOOL result = FALSE; - - // Verify tester has logged in with TD and override type is valid - if ( TRUE == isTestingActivated() ) - { - // Verify payload length is valid - if ( sizeof( U32 ) == message->hdr.payloadLen ) - { - U32 power; - - memcpy( &power, message->payload, sizeof(U32) ); - if ( power <= AIR_PUMP_MOTOR_MAX_PWM ) - { - setAirPumpMotorPower( (U08)power ); - result = TRUE; - } - } - } - - return result; -} - /**@}*/