CROSS Technical Documentation User Manual and Technical Doc.
INFN Milano Bicocca
Loading...
Searching...
No Matches
I2C_mux.h File Reference
#include <stdint.h>
#include "Driver_I2C.h"

Go to the source code of this file.

Macros

#define I2C_mux_address_mainboard   (uint8_t) 0x71
 I2C 7 bits address of the mainboard I2C_mux.
 
#define I2C_mux_address_postmainboard_up   (uint8_t) 0x72
 I2C 7 bits address of the postmainboard down I2C_mux.
 
#define I2C_mux_address_postmainboard_down   (uint8_t) 0x74
 I2C 7 bits address of the postmainboard up I2C_mux.
 
#define I2C_postmainboard   0
 
#define I2C_mainboard   1
 
#define I2C_mux_Scheda_su   1
 Selection of the I2C0 for the upper board (purtroppo \'e contorto)
 
#define I2C_mux_Scheda_giu   0
 Selection of the I2C1 for lower board (purtroppo \'e contorto)
 
#define I2C_mux_disabilita_tutto   0
 i2C transmission/reception was bad
 
#define I2C_mux_abilita_0   (uint8_t) 1
 Enable channel 0.
 
#define I2C_mux_abilita_1   I2C_mux_abilita_0 * (uint8_t) 2
 Enable channel 1.
 
#define I2C_mux_abilita_2   I2C_mux_abilita_1 *(uint8_t) 2
 Enable channel 2.
 
#define I2C_mux_abilita_3   I2C_mux_abilita_2 * (uint8_t) 2
 Enable channel 3.
 

Functions

void I2C_mux_select_ch (uint8_t scheda_su_scheda_giu, uint8_t mainboard_postmainboard, uint8_t canale_da_abilitare)
 The I2C mux.
 

Variables

uint8_t scheda_su_scheda_giu_provvisorio
 
volatile uint8_t scheda_su_scheda_giu
 
volatile uint8_t I2C_corretto
 
volatile uint8_t I2C_errore
 I2c transmission/reception was good.
 
ARM_DRIVER_I2C * I2C_mux