Index: firmware/App/Services/Reservoirs.h =================================================================== diff -u -r8059b3b67364c3593091a23266f33186430ffe26 -r6145c5d1a645646587fb077df3c61eef2354f744 --- firmware/App/Services/Reservoirs.h (.../Reservoirs.h) (revision 8059b3b67364c3593091a23266f33186430ffe26) +++ firmware/App/Services/Reservoirs.h (.../Reservoirs.h) (revision 6145c5d1a645646587fb077df3c61eef2354f744) @@ -38,6 +38,14 @@ NUM_OF_RESERVOIRS ///< Number of reservoirs } RESERVOIR_ID_T; +/// Enumeration of valve settings. +typedef enum Valve_Setting +{ + VALVE_SETTING_R1_TO_R2 = 0, ///< Valve setting for displacement from reservoir 1 to reservoir 2 + VALVE_SETTING_R2_TO_R1, ///< Valve setting for displacement from reservoir 2 to reservoir 1 + NUM_OF_VALVE_SETTTINGS ///< Number of valve settings +} VALVE_SETTING_ID_T; + #pragma pack(push,1) /// Drain command data structure. @@ -61,13 +69,14 @@ void initReservoirs( void ); void execReservoirs( void ); + +void setActiveReservoirCmd( RESERVOIR_ID_T resID ); // handle switch reservoirs command from HD +void changeValveSettingCmd( VALVE_SETTING_ID_T valveSettingID ); // handle valve setting change command from HD +void startFillCmd( U32 fillToVolMl ); // handle fill command from HD +void stopFillCmd( void ); // handle stop fill command from HD +void startDrainCmd( DRAIN_CMD_T drainCmd ); // handle drain command from HD +void stopDrainCmd( void ); // handle stop drain command from HD -void setActiveReservoirCmd( RESERVOIR_ID_T resID ); // handle switch reservoirs command from HD -void startFillCmd( U32 fillToVolMl ); // handle fill command from HD -void stopFillCmd( void ); // handle stop fill command from HD -void startDrainCmd( DRAIN_CMD_T drainCmd ); // handle drain command from HD -void stopDrainCmd( void ); // handle stop drain command from HD - RESERVOIR_ID_T getInactiveReservoir( void ); BOOL hasTargetFillVolumeBeenReached( RESERVOIR_ID_T reservoirId ); BOOL hasTargetDrainVolumeBeenReached( RESERVOIR_ID_T reservoirId , U32 timeout );