Setting the state of the detector realis: pre connected to detector or intrnal resistor, polarity of the detector bias, load resistro choiche and internal or external detector bias.
125 SPIdrv->Send ( &valore_da_trasmettere ,1);
129 uint8_t troppa_attesa=0;
130 while( (SPIdrv->GetStatus().busy) && (troppa_attesa <250) ){
146 SPIdrv->Send ( &zero ,1);
153 uint8_t canalone=scheda_su_giu *6 + numero_canale;
uint8_t detector_Relay_state[12]
The state of the Detector realis is considerede. Note that this is the wanted working condition....
void Relays_driver_set_reset_channel(uint8_t scheda_su_giu, uint8_t numero_canale, uint8_t valore_da_trasmettere)
Setting the state of the detector realis: pre connected to detector or intrnal resistor,...
#define Detector_small_RLOAD
#define Detector_prea_to_det
#define wait_time_for_rele_setting
[ref_spi_clock_for_relais]
#define Detector_bias_invertito
#define Detector_external_bias
#define Detector_internal_bias
#define Detector_prea_to_GND
#define Detector_bias_diretto
#define spi_clock_for_relais
[ref_spi_clock_for_relais]
#define Detector_large_RLOAD
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.
@ error_address_SPI
Error register for SPI.
@ SPI_error_EVENT_DATA_LOST
This is ARM_SPI_EVENT_DATA_LOST.
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]
...
#define SPI_control_for_relay_driver
[ref_SPI_control_for_relay_driver]
void Aspetta_tanti_ms(int millisecondi)
The timing function.
uint8_t I2C_to_parallel_chip_num
This is the I2C to parallel chip to which the driver is connectted, they are 3.
uint8_t I2C_to_parallel_chip__pin_num
This is the outputo pin to enable.