aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Drivers
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-02-27 12:05:21 +0200
committerShlomo Hecht <shlomo@twine-s.com>2019-02-27 12:05:21 +0200
commit067e34ae548d2125cf92477af4e8afb4e85f63ce (patch)
tree7bbd5184939f427b9df193948c35d9a1f700e2ea /Software/Embedded_SW/Embedded/Drivers
parent39b56dcb67c5b1aa99975a724916429ae25576c0 (diff)
parent88a73106e8113a4a6ce224f9205e11219939798e (diff)
downloadTango-067e34ae548d2125cf92477af4e8afb4e85f63ce.tar.gz
Tango-067e34ae548d2125cf92477af4e8afb4e85f63ce.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Drivers')
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c27
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h2
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.c5
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.h7
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/I2C_Communication/RFID_NFC/RFIDTagInfo.h49
5 files changed, 73 insertions, 17 deletions
diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c
index c3d8426a6..dc34cbd2d 100644
--- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c
+++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c
@@ -148,43 +148,43 @@ void FPGA_Read_LS_Safty_Ind_Reg()
}
-bool Check_Disp_Sfaty_Stop_Indication(uint8_t Dispenser_ID)//0..7
+bool Check_Disp_Safety_Stop_Indication(uint8_t Dispenser_ID)//0..7
{
- bool Sfaty_Indication = OK;
+ bool Safety_Indication = OK;
assert(Dispenser_ID < MAX_DISPENSER_NUM);
switch(Dispenser_ID)
{
case 0:
- Sfaty_Indication = LS_Dispenser_1_2.bits.F2_DISP_SAFETY_STOP_IND_1;
+ Safety_Indication = LS_Dispenser_1_2.bits.F2_DISP_SAFETY_STOP_IND_1;
break;
case 1:
- Sfaty_Indication = LS_Dispenser_1_2.bits.F2_DISP_SAFETY_STOP_IND_2;
+ Safety_Indication = LS_Dispenser_1_2.bits.F2_DISP_SAFETY_STOP_IND_2;
break;
case 2:
- Sfaty_Indication = LS_Dispenser_3_4.bits.F2_DISP_SAFETY_STOP_IND_3;
+ Safety_Indication = LS_Dispenser_3_4.bits.F2_DISP_SAFETY_STOP_IND_3;
break;
case 3:
- Sfaty_Indication = LS_Dispenser_3_4.bits.F2_DISP_SAFETY_STOP_IND_4;
+ Safety_Indication = LS_Dispenser_3_4.bits.F2_DISP_SAFETY_STOP_IND_4;
break;
case 4:
- Sfaty_Indication = LS_Dispenser_5_6.bits.F2_DISP_SAFETY_STOP_IND_5;
+ Safety_Indication = LS_Dispenser_5_6.bits.F2_DISP_SAFETY_STOP_IND_5;
break;
case 5:
- Sfaty_Indication = LS_Dispenser_5_6.bits.F2_DISP_SAFETY_STOP_IND_6;
+ Safety_Indication = LS_Dispenser_5_6.bits.F2_DISP_SAFETY_STOP_IND_6;
break;
case 6:
- Sfaty_Indication = LS_Dispenser_7_8.bits.F2_DISP_SAFETY_STOP_IND_7;
+ Safety_Indication = LS_Dispenser_7_8.bits.F2_DISP_SAFETY_STOP_IND_7;
break;
case 7:
- Sfaty_Indication = LS_Dispenser_7_8.bits.F2_DISP_SAFETY_STOP_IND_8;
+ Safety_Indication = LS_Dispenser_7_8.bits.F2_DISP_SAFETY_STOP_IND_8;
break;
default:
break;
}
- return Sfaty_Indication;
+ return Safety_Indication;
}
bool FPGA_Read_limit_Switches(FPGA_GPI_ENUM Limit_Switch)
@@ -406,10 +406,10 @@ bool FPGA_Read_limit_Switches(FPGA_GPI_ENUM Limit_Switch)
LM_Status = Ls_Dryer_Dh.bits.F1_LS_DH_CLEAN_UP;
break;
case GPI_LS_DH_CLEAN_RIGHT:
- LM_Status = Ls_Dryer_Dh.bits.F1_LS_DH_CLEAN_RIGHT;
+ LM_Status = !(Ls_Dryer_Dh.bits.F1_LS_DH_CLEAN_RIGHT);
break;
case GPI_LS_DH_CLEAN_LEFT:
- LM_Status = Ls_Dryer_Dh.bits.F1_LS_DH_CLEAN_LEFT;
+ LM_Status = !(Ls_Dryer_Dh.bits.F1_LS_DH_CLEAN_LEFT);
break;
case GPI_LS_DH_CLEAN_DOWN:
LM_Status = Ls_Dryer_Dh.bits.F1_LS_DH_CLEAN_DOWN;
@@ -561,6 +561,7 @@ bool WHS_GPI_CHILLER_FAULT()
bool WHS_GPI_WASTE_OVERFULL()//waste tank overflow
{
+#warning NA need to check the DISP_SAFETY_STOP_IND of all the connected dispensers
return F2_GPI_Reg.bits.F2_WASTE_OVERFULL_NO;
}
diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h
index c83e939fd..c98ba5941 100644
--- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h
+++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h
@@ -234,7 +234,7 @@ typedef enum
void Pumps_Control(PUMPS_ENUM Pump_Id, bool Direction);
uint32_t Control_Dryer_Fan(bool StartStop, uint8_t PWM_Command_Precent);
-bool Check_Disp_Sfaty_Stop_Indication(uint8_t Dispenser_ID);
+bool Check_Disp_Safety_Stop_Indication(uint8_t Dispenser_ID);
bool Emergency_Push_Button_Report();
//bool Dryer_Door_Switch();
uint8_t Pannel_Leds(PANEL_BUTTON_OR_CRAT_ID Pannel_Led_Id, OPERATION_MODE LED_Mode);
diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.c
index 4f78927d8..96e42fc36 100644
--- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.c
+++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.c
@@ -355,3 +355,8 @@ double Get_Heaters_Current(HEATERS_CURRENT Heater_ID) //0-8
assert (Heater_ID<NUM_OF_HEATERS);
return Heaters_Current[Heater_ID];
}
+int Get_Heaters_Current_Integer(HEATERS_CURRENT Heater_ID) //0-8
+{
+ assert (Heater_ID<NUM_OF_HEATERS);
+ return (int)(Heaters_Current[Heater_ID]*100);
+}
diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.h b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.h
index 408feb745..1c5fb6dbd 100644
--- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.h
+++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.h
@@ -50,9 +50,10 @@ void MidTankPressureCorrection(double Offset);
void Enable_MidTank_Pressure_Reading(MidTank_t MidTank_ID); //0-7
void Disable_MidTank_Pressure_Reading(MidTank_t MidTank_ID); //0-7
-void Enable_Head_MixChip_Heaters_Current_Reading(HEATERS_CURRENT Heater_ID);
-void Disable_Head_MixChip_Heaters_Current_Reading(HEATERS_CURRENT Heater_ID); //0-5
+void Enable_Reading_Heaters_Current(HEATERS_CURRENT Heater_ID);
+void Disable_Reading_Heaters_Current(HEATERS_CURRENT Heater_ID); //0-5
uint32_t Read_Head_MixChip_Heaters_Current(HEATERS_CURRENT Heater_ID);
-double Get_Head_MixChip_Heaters_Current(HEATERS_CURRENT Heater_ID);
+double Get_Heaters_Current(HEATERS_CURRENT Heater_ID);
+int Get_Heaters_Current_Integer(HEATERS_CURRENT Heater_ID); //0-8
#endif /* DRIVERS_I2C_COMMUNICATION_ADC_MUX_ADC_MUX_H_ */
diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/RFID_NFC/RFIDTagInfo.h b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/RFID_NFC/RFIDTagInfo.h
new file mode 100644
index 000000000..9136e4007
--- /dev/null
+++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/RFID_NFC/RFIDTagInfo.h
@@ -0,0 +1,49 @@
+/*
+ * RFIDTagInfo.h
+ *
+ * Created on: Feb 26, 2019
+ * Author: avi
+ */
+
+#ifndef DRIVERS_I2C_COMMUNICATION_RFID_NFC_RFIDTAGINFO_H_
+#define DRIVERS_I2C_COMMUNICATION_RFID_NFC_RFIDTAGINFO_H_
+
+typedef struct
+{
+ uint8_t TagUniqueID[7]; //RFID Tag unique ID
+ uint8_t CartSN[16]; //Cartridge serial number
+ uint32_t InkFactoryID:24; //Ink factory ID
+ uint32_t FillSysID:16; //Filling system ID number
+ uint32_t ColorID; //Color description / ID
+ uint32_t InkCategory:16; //Ink category (TBD)
+ uint32_t Type_Rev:16; //TBD – can be formulation #
+ uint32_t CartridgeSize; //Size in cc
+ uint32_t FiledInkVol; //Size in cc
+ uint32_t InkBatchNo:16; //MFG batch No’
+ uint8_t InkMFGDate[6]; //Date Ink was manufactured (20L container bar-code)
+ uint8_t InkEOLDate[6]; //Ink end of life date
+ uint8_t CartFillDate[6]; //Date cartridge was filled with ink (CFS)
+ uint8_t WasteFillDate[6]; //Date cartridge was filled with waste (Machine)
+ uint32_t Misc;
+ uint32_t PluginCounter:16; //Number of times cartridge was plugged in INK Slot
+ uint8_t InkFillStatus; //State indicator - successful state change when starting to fill mid. tank
+ uint8_t InkUsedStatus;
+ uint8_t InkEmptyStatus;
+ uint8_t WasteEmptyStatus;
+ uint8_t WasteFillStatus;
+ uint8_t WasteFullStatus;
+ uint8_t Blocked;
+ uint8_t Fail;
+ uint32_t WasteCounter:16;
+ uint8_t MachineIdINL[16];
+ uint8_t MachineIdWST[16];
+ uint8_t Spare[4];
+}NFCTag_t;
+
+typedef union
+{
+ NFCTag_t Struct;
+ uint8_t Buf[sizeof(NFCTag)];
+}NFC_Tag;
+
+#endif /* DRIVERS_I2C_COMMUNICATION_RFID_NFC_RFIDTAGINFO_H_ */