aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Drivers
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-06-18 17:15:02 +0300
committerShlomo Hecht <shlomo@twine-s.com>2018-06-18 17:15:02 +0300
commit5d5ca12a57e86aa3f566eafa9c71663cdf563708 (patch)
tree16d2b9cb7dc71b24ad3bea73369824195f454b01 /Software/Embedded_SW/Embedded/Drivers
parent0bd5bb08169bf0c72dc686b48b12499f61122958 (diff)
downloadTango-5d5ca12a57e86aa3f566eafa9c71663cdf563708.tar.gz
Tango-5d5ca12a57e86aa3f566eafa9c71663cdf563708.zip
basic IDS with valves handling
Diffstat (limited to 'Software/Embedded_SW/Embedded/Drivers')
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c2
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/Valves/Valve.c3
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/Valves/Valve.h4
3 files changed, 5 insertions, 4 deletions
diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c
index cec8b74af..ef16e472f 100644
--- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c
+++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c
@@ -13,7 +13,6 @@
#include "PMR/Hardware/HardwareDancerType.pb-c.h"
extern TempSensorResponseStruct TempSensorResponse[MAX_TEMPERATURE_SENSOR_ID];
-void FPGA_SetMotStop(TimerMotors_t _motorId);
#include <drivers/FPGA/FPGA_SSI_Comm.h>
///////////////////////////////////////////////////////////////////////////////
@@ -301,6 +300,7 @@ typedef enum
MOTOR_CONFIG_HARD_HIZ,
MOTOR_CONFIG_ACC,
MOTOR_CONFIG_DEC,
+ MOTOR_CONFIG_MIN_SPEED,
MOTOR_CONFIG_MAX_SPEED,
MOTOR_CONFIG_STEP_MODE,
MOTOR_CONFIG_CONFIG,
diff --git a/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.c b/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.c
index 8b375b311..4056f0175 100644
--- a/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.c
+++ b/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.c
@@ -311,7 +311,8 @@ uint32_t Valve3WayCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag)
RemoveControlCallback(Valve3WayControlId[ValveId], Valve3WayCallBackFunction );
//call the module callback
- Valve3WayModuleCallback[ValveId](ValveId,BusyFlag);
+ if (Valve3WayModuleCallback[ValveId])
+ Valve3WayModuleCallback[ValveId](ValveId,BusyFlag);
}
return OK;
diff --git a/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.h b/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.h
index 7af24aed7..fc118f683 100644
--- a/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.h
+++ b/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.h
@@ -12,7 +12,7 @@
typedef enum
{
//Dispenser Valves
- // must be from ubdex 0-7 in order to use Valve3WayModuleCallback and Valve3WayControlId as array of 8 !
+ // must be from index 0-7 in order to use Valve3WayModuleCallback and Valve3WayControlId as array of 8 !
VALVE_DISPENSER_1,
VALVE_DISPENSER_2,
VALVE_DISPENSER_3,
@@ -53,5 +53,5 @@ void Valve_Command(Valves_t Valve_Id);
void Valve_Set(Valves_t Valve_Id, bool Direction);
void SetAllDispensersValves(bool Direction);
void FPGA_GetDispenserValveBusyOCD();// OCD - Over Current Detection
-
+uint32_t Control3WayValvesWithCallback (Valves_t _ValveId, bool direction, callback_fptr callback); //direction: MidTank_Dispenser or Dispenser_Mixer
#endif /* DRIVERS_VALVES_VALVE_H_ */