diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-07-19 11:29:11 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-07-19 11:29:11 +0300 |
| commit | facf3fea6ebc728cdd09d6d2a22bd32bfe8de6b9 (patch) | |
| tree | ad18e27d769ca53a483b012193fc1197b9704b59 /Software/Embedded_SW/Embedded/Main.c | |
| parent | c90b4e2e753a0a86ebb2af4dc827cda206b148b6 (diff) | |
| parent | a23042015bb78f0603440f5746edbc509877faa9 (diff) | |
| download | Tango-facf3fea6ebc728cdd09d6d2a22bd32bfe8de6b9.tar.gz Tango-facf3fea6ebc728cdd09d6d2a22bd32bfe8de6b9.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Main.c')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Main.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/Software/Embedded_SW/Embedded/Main.c b/Software/Embedded_SW/Embedded/Main.c index 3be36668d..88ba521a4 100644 --- a/Software/Embedded_SW/Embedded/Main.c +++ b/Software/Embedded_SW/Embedded/Main.c @@ -39,6 +39,7 @@ #include <DataDef.h> #include "Sys_PinOut_Config/MCU_MAIN_pinout.h" +#include <Drivers/I2C_Communication/I2C.h> /* #include "Drivers/SPI_SDCARD/SDSPI.h" @@ -84,7 +85,7 @@ #include "Drivers/I2C_Communication/Head_Card/IO_Ports/Head_IO.h" #include "Drivers/I2C_Communication/Head_Card/EEPROM/Head_EEPROM.h" #include "modules/AlarmHandling/AlarmHandling.h" -//#include <Drivers/I2C_Communication/I2C_Task.h> +#include <Drivers/I2C_Communication/I2C_Task.h> #include <Drivers/I2C_Communication/WHS_Card/EEPROM/WHS_EEPROM.h> #include <Drivers/I2C_Communication/RFID_NFC/I2C_IFS_Mux.h> //***************************************************************************** @@ -265,21 +266,25 @@ int main(void) Init_All_I2C(); Block_Main_MUX_TCA9548A_0xE4();//unused, same i2c as head and whs cards - Check_Head_Type_Via_EEPROM(); + I2C_BUSY_DELAY = 3000; //temporary workaround!!! + Check_Head_Type_Via_EEPROM();//without trigger + Check_WHS_Type_Via_EEPROM();//without trigger + I2C_BUSY_DELAY = 100; //temporary workaround!!! + if ((Head_Type >= HEAD_TYPE_UNKNOWN_WITH_CARD)&&(WHS_Type == WHS_TYPE_NEW)) + { + PP_Machine = true; + } + if ((Head_Type > HEAD_TYPE_SYLKO_WITHOUT_CARD)||(WHS_Type == WHS_TYPE_NEW)) + { + I2C_ReadingTask_Init(); + } if (Head_Type > HEAD_TYPE_SYLKO_WITHOUT_CARD) { - Head_IO_Init();//moved to set 24 to pressure sensor in arc earlier + Trigger_Head_io_Init();//Head_IO_Init();//moved to set 24 to pressure sensor in arc earlier } - //Trigger_Check_WHS_Type_Via_EEPROM(); - Check_WHS_Type_Via_EEPROM(); - Check_IFS_Availability(); - if ((Head_Type >= HEAD_TYPE_UNKNOWN_WITH_CARD)&&(WHS_Type == WHS_TYPE_NEW)) - { - PP_Machine = true; - } #ifndef EVALUATION_BOARD STATUS_RED_LED_ON; STATUS_GREEN_LED_ON; @@ -290,8 +295,6 @@ int main(void) SysCtlUSBPLLEnable(); - - #ifndef EVALUATION_BOARD DeActivateAllSSR(); Control_Dryer_Fan(STOP,0);//Preventing unwanted movement at power up, since the default from FPGA is "0" (= START) @@ -310,8 +313,7 @@ int main(void) //ActivateHeadMagnet(); Set_Speed_Sensor_TypeII_Registers(10,5);//set default values #endif - if ((Head_Type > HEAD_TYPE_SYLKO_WITHOUT_CARD)||(WHS_Type == WHS_TYPE_NEW)) - I2C_ReadingTask_Init(); + //EMAC_initEMAC(); ControlInit(); |
