73#include "tutti_gli_header.h"
81ARM_DRIVER_I2C * I2C_mux;
100void I2C_mux_select_ch( uint8_t scheda_su_scheda_giu, uint8_t mainboard_postmainboard , uint8_t canale_da_abilitare){
103 I2C_mux = &Driver_I2C1;
110 I2C_mux = &Driver_I2C0;
120 if(mainboard_postmainboard==I2C_mainboard){
122 while( I2C_mux -> GetStatus().busy);
125 while( I2C_mux -> GetStatus().busy);
126 }
else if(mainboard_postmainboard==I2C_postmainboard){
130 while( I2C_mux -> GetStatus().busy);
134 while( I2C_mux -> GetStatus().busy);
137 while( I2C_mux -> GetStatus().busy);
140 while( I2C_mux -> GetStatus().busy);
volatile uint32_t Error_bad_operation
exploited to mark the errors
void ERROR_codifica_errore(uint8_t scheda_su_scheda_giu, unsigned char error_addres, unsigned char code_to_shift, uint8_t reset_count_se_0)
If an error is found its flag is codified here.
@ I2C_Error_I2C_mux
Trouble with I2C mux communication.
@ error_address_I2C0
Error register A for I2C0.
const porta_pin_def Reset_I2C_mux_down
location of the reset pin of the I2C_mux of frontend board su or giu
const porta_pin_def Reset_I2C_mux_up
location of the reset pin of the I2C_mux of frontend board su or giu
const porta_pin_def Reset_I2C_mux_postfrontend_up
location of the reset pin of the I2C_mux of post-frontend board su or giu
const porta_pin_def Reset_I2C_mux_postfrontend_down
location of the reset pin of the I2C_mux of post-frontend board su or giu
void I2C_mux_select_ch(uint8_t scheda_su_scheda_giu, uint8_t mainboard_postmainboard, uint8_t canale_da_abilitare)
The I2C mux.
#define I2C_mux_address_postmainboard_down
I2C 7 bits address of the postmainboard up I2C_mux.
#define I2C_mux_Scheda_giu
Selection of the I2C1 for lower board (purtroppo \'e contorto)
#define I2C_mux_address_postmainboard_up
I2C 7 bits address of the postmainboard down I2C_mux.
#define I2C_mux_address_mainboard
I2C 7 bits address of the mainboard I2C_mux.
#define I2C_mux_Scheda_su
Selection of the I2C0 for the upper board (purtroppo \'e contorto)
void Aspetta_tanti_ms(int millisecondi)
The timing function.