#include "stdint.h" #include "stdbool.h" /// \file /*! \brief instr_NO_operation has the value of zero and the follwoing instructions are increased by one at each step. The last enum line, instr_Trimmer_setting, is not an instruction but the information of the total number of instructions. */ enum instructions { //Basic system instr_NO_operation , //!< NOP, the fw version is replayed instr_Shut_Down_ON_OFF , //!< µ-controller can be maintained always ON instr_inizializza_tutto_da_zero, //!< µ-controller is reset. The perifelal are all initialized. //Detctor bias instr_detector_Vbias_we_want_to_set , //!< The voltage we intend to set to the detector. This command does not apply the voltage. instr_Vbias_to_be_set, //!< The voltage set with \b instr_detector_Vbias_we_want_to_set is set to the detector. instr_Relays_driver_set_reset_channel, //!< Set / reset of the relais that manage the detectors. instr_detector_scrittura_lettura_trimmer_bias, //!< Write /read to /from the trimmers for the detectors biases. //Preamplifier instr_preamplifier_gain_low_high_set, //!< Set /reset of the large gain for the preamplifier instr_preamplifier_temperature_meas, //!< Measure the preamplifier temperature instr_preamplifier_memory, //!< Write /read the preamplifier EPROM instr_ouput_offset_we_want_to_set, //!< Set the output offset to set channel per channel instr_output_offset_to_be_set, //!< Adjust the ouput voltage that was previously set at #instr_ouput_offset_we_want_to_set instr_preamplifier_scrittura_lettura_trimmer_offset, //!< Write /read to /from the trimmers for the preamplifier offset adjustment. //PGA managing instr_PGA_gain_set, //!< Set the PGA gain value instr_PGA_set_reset_pre_PGA_gain, //!< Set /reset of the first stage of PGA instr_PGA_DAC_GAIN_CROSS, //!< Set the gain of the second stage of the PGA. //Errors instr_ERROR_inspection, //!< quering about the presence of any error instr_ERROR_echo_on_off, //!< if enabled, echo of the error via CAN as soon as the error is verified //Common use instr_ADC_LETTURA , //!< ADC reading, the following byte from the CAN set the reading node instr_readback_variables, //!< Variables Readback instr_readback_node_voltages, //!< Nodes voltage read from external ADC //Expert use instr_offset_trimmer_calibration, //!< fine and coarse trimmer calibration for ofset compensation instr_DetBias_trimmer_calibration, //!< fine and coarse trimmer calibration for detector bias compensation instr_EPROM_read_write, //!< read from preamplifier or mainboard or post frontend board EPROM instr_connect_disconnect_mux_node, //!< select/deselect a node from the analog mux instr_LED_ON_OFF, //!< LEDs can be switched ON/OFF for test and diagnostic instr_periferal_reset, //!< I2C, SPI and CAN can be reset The_total_number_of_instrucions, //!< This is the total numebr of instructions, not an instruction //qui sotto da fare // instr_pre_PGA_gain , //!< Relay settings according to the second byte from the CAN // instr_PGA_GAIN , //!< . // instr_Power_supply_ON_OFF , //!< . // instr_OFFSET_ADJ , //!< . // instr_measure_pre_bias_coefficients , //!< . // instr_Some_parameters_to_set , //!< here some usefull parameters can be set, such as wait times, etc. // instr_ricalibrazione_scheda, //!< . // instr_Vbias_and_OFFSET_SET , //!< . // instr_Drift_compensation , //!< . // instr_Trimmer_setting, // instr_Vbias_set //!< . } ; /*! \brief Variables to readback The last enum line, instr_Trimmer_setting, is not an instruction but the information of the total number of instructions. */ enum instr_variable_to_read { instr_detector_bias_variable, //!< detector set voltage vector instr_offset_voltage_variable, //!< detector set voltage vector instr_PGA_gain_variable //!< PGA gain vector };