3#include "tutti_gli_header.h"
185 I2C_mux -> MasterTransmit( indirizzo, comando, 2,
false);
186 while( I2C_mux -> GetStatus().busy);
189 comando[1]= impostazione_iniziale_della_porta;
190 I2C_mux -> MasterTransmit( indirizzo, comando, 2,
false);
191 while( I2C_mux -> GetStatus().busy);
194 I2C_mux -> MasterTransmit( indirizzo, comando, 1,
true);
195 while( I2C_mux -> GetStatus().busy);
198 I2C_mux -> MasterReceive( indirizzo, comando, 1,
false);
199 while( I2C_mux -> GetStatus().busy);
231 I2C_mux -> MasterTransmit( indirizzo, comando, 2,
false);
232 while( I2C_mux -> GetStatus().busy);
236 I2C_mux -> MasterTransmit( indirizzo, comando, 1,
true);
237 while( I2C_mux -> GetStatus().busy);
241 I2C_mux -> MasterReceive( indirizzo, comando, 1,
false);
242 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_to_parallel_PCA9554_0
I2C to parallel conversion ch0.
@ error_address_I2C0
Error register A for I2C0.
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_disabilita_tutto
i2C transmission/reception was bad
#define I2C_mux_abilita_3
Enable channel 3.
void I2C_to_Parallel_set_PCA9554_outputs_values(uint8_t scheda_su_scheda_giu, uint8_t select_PCA, uint8_t value)
The function I2C_to_Parallel_set_PCA9554_outputs_values allow to set the output pin of the I2C to par...
const struct chip_select_type detector_chip_select_bias[6]
This is the vector of constant values which allows to enable the relays drivers of each channels,...
const uint8_t I2C_to_Parallel_ini_set[4]
...
void I2C_to_Parallel_ini_PCA9554(uint8_t scheda_su_scheda_giu, uint8_t select_PCA)
The I2C_to_Parallel_ini_PCA9554 inits the I2C_to_Parallel_ini_PCA9554 chips by setting all the output...
I2C_to_Parallel_pin_type
These are the aliases for the I2C to parallel output.
@ pin_1
This is the first pin of the output port.
@ pin_8
This is the last pin of the output port.
#define I2C_to_Parallel_name_3
the third PCA
#define I2C_to_Parallel_Command_configuration_register
Configuration register, set to 0 for ouput of the corresponding bit.
#define I2C_to_Parallel_Command_read_output
Read output pin, either if they are inputs or outpus.
#define I2C_to_Parallel_address_2
address of the second I2C to parallel
#define I2C_to_Parallel_address_3
address of the third I2C to parallel
#define I2C_to_Parallel_2_ini_set
#define I2C_to_Parallel_name_1
the first PCA
#define I2C_to_Parallel_1_ini_set
#define I2C_to_Parallel_address_1
address of the first I2C to parallel
#define I2C_to_Parallel_name_2
the second PCA
#define I2C_to_Parallel_3_ini_set
#define I2C_to_Parallel_Command_data_to_write
Data are written in the bits set as output.
This is the struct definition for the selection of the chip select of the relays drivers.