diff options
| author | Avi Levkovich <avi@twine-s.com> | 2020-01-13 14:11:44 +0200 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2020-01-13 14:11:44 +0200 |
| commit | b8f7eaccfcd714a99dd71446150887691d066a2a (patch) | |
| tree | 6f8ce4c8c9d055a62c0c774d9026a27fe34cd39c /Software/Embedded_SW/Embedded | |
| parent | fd0d8d7668aefea359dad4d7737bb4c71344a292 (diff) | |
| download | Tango-b8f7eaccfcd714a99dd71446150887691d066a2a.tar.gz Tango-b8f7eaccfcd714a99dd71446150887691d066a2a.zip | |
Add function to block the third unused I2C3 mux (the same i2c as head and whs cards)
Diffstat (limited to 'Software/Embedded_SW/Embedded')
4 files changed, 19 insertions, 1 deletions
diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/I2C.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/I2C.c index 38f7d0494..91d1ea7dd 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/I2C.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/I2C.c @@ -329,3 +329,19 @@ uint32_t I2C_control(uint32_t I2C_ID, uint32_t Slave_Add, bool RW,uint32_t Byte2 +#define I2C_ID_MUX_TCA9548A_0xE4 0x03 +#define I2C3_MAIN_MUX_TCA9548A_0xE4 0xE4//Slave_Add + +uint32_t Block_Main_MUX_TCA9548A_0xE4() ////unused I2C MUX +{ + uint32_t status= OK; + + uint8_t Write_Buf[1]; + + Write_Buf[0] = 0x00;//Block all + + status = I2C_Write(I2C_ID_MUX_TCA9548A_0xE4, I2C3_MAIN_MUX_TCA9548A_0xE4, Write_Buf, 1); + + return status; +} + diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/I2C.h b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/I2C.h index acd001091..aa573b362 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/I2C.h +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/I2C.h @@ -29,6 +29,7 @@ void Trigger_Heater_Current_Read(void); void Trigger_MidTank_Pressure_Read(void); void Trigger_PT100_Read(void); void Trigger_HeaterWriting(void); +uint32_t Block_Main_MUX_TCA9548A_0xE4(); ////unused I2C MUX extern uint8_t Main_Mux_Flag ; extern Semaphore_Handle I2C_Sem; diff --git a/Software/Embedded_SW/Embedded/Main.c b/Software/Embedded_SW/Embedded/Main.c index f07937db0..ea588fe2a 100644 --- a/Software/Embedded_SW/Embedded/Main.c +++ b/Software/Embedded_SW/Embedded/Main.c @@ -238,6 +238,7 @@ int main(void) #endif Init_All_I2C(); + Block_Main_MUX_TCA9548A_0xE4();//unused, same i2c as head and whs cards #ifndef EVALUATION_BOARD STATUS_RED_LED_ON; diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c index ea2ad594a..2e39607d6 100644 --- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c +++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c @@ -30,7 +30,7 @@ #include <Drivers/I2C_Communication/Head_Card/IO_Ports/Head_IO.h> #include "drivers/adc_sampling/adc.h" -extern double NumberOfRotationPerPassage; // how many rotations per spool passage +extern float NumberOfRotationPerPassage; // how many rotations per spool passage //#include "graphics_adapter.h" extern uint8_t Input_Voltage; |
