If an error is found its flag is codified here.
The errors are 32 bit flag regsiters. The bits that are 1 indicates that the corresponding error was verified.
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 ){
uint8_t iii, buffer_instruction[8],actual_error_address=error_addres;
if( reset_count_se_0 ==0){
Error_good_operation=0;
flag_error_verified=0;
}
__NOP();
}else {
if( reset_count_se_0 > 0 ){
{
flag_error_verified++;
}
for( iii=0;iii<8;iii++){
buffer_instruction[iii]=
tx_data[iii];
}
for( iii=0;iii<8;iii++){
tx_data[iii]=buffer_instruction[iii];
}
}
}
}
}
@ instr_ERROR_echo_on_off
if enabled, echo of the error via CAN as soon as the error is verified
uint8_t tx_data[8]
Transmission data vector.
uint32_t tx_obj_idx
This is the variable which resembles the flags from the communication.
unsigned int indirizzo_CAN_della_scheda
Per ora lo assegnamo cos\i l'indirizzo della scheda.
void store_errors(void)
Copy all errors in a buffer.
unsigned int Post_frontend_errors[error_number_of_errors_registers+error_offset_for_board_up]
Error are notified via can if =1; not notified if =0.
volatile unsigned char can_send_error
The shift bit of the last error.
volatile uint32_t Error_bad_operation
exploited to mark the errors
volatile unsigned char last_code_to_shift
The address of the last verified error.
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.
volatile unsigned char last_error_address
Il flag di errore veirifcato e tutti gli errori vengono resettati perch\'e acquisiti.
@ error_address_I2C0
Error register A for I2C0.
@ error_offset_for_board_up
=15, First addresss for board up errors
@ error_address_I2C1
Error register A for I2C1
@ error_address_SPI
Error register for SPI.
void Aspetta_tanti_ms(int millisecondi)
The timing function.