1#include "tutti_gli_header.h"
128const porta_pin_def PGA_DAC_pin_select_ch0={0,PGA_Chip_Sel_DAC_ch0};
129const porta_pin_def PGA_DAC_pin_select_ch1={0,PGA_Chip_Sel_DAC_ch1};
175Mux_analog_postmainboard_lines_2_PGA_Output_pos_1, Mux_analog_postmainboard_lines_2_PGA_Output_pos_2,
176Mux_analog_postmainboard_lines_2_PGA_Output_pos_3,Mux_analog_postmainboard_lines_2_PGA_Output_pos_4,
177Mux_analog_postmainboard_lines_2_PGA_Output_pos_5,Mux_analog_postmainboard_lines_2_PGA_Output_pos_6,
179Mux_analog_postmainboard_lines_3_PGA_Output_neg_1,Mux_analog_postmainboard_lines_3_PGA_Output_neg_2,
180Mux_analog_postmainboard_lines_3_PGA_Output_neg_3,Mux_analog_postmainboard_lines_3_PGA_Output_neg_4,
181Mux_analog_postmainboard_lines_3_PGA_Output_neg_5,Mux_analog_postmainboard_lines_3_PGA_Output_neg_6,
183Mux_analog_postmainboard_lines_1_PRE_pos_1,Mux_analog_postmainboard_lines_1_PRE_pos_2,
184Mux_analog_postmainboard_lines_1_PRE_pos_3,Mux_analog_postmainboard_lines_1_PRE_pos_4,
185Mux_analog_postmainboard_lines_1_PRE_pos_5,Mux_analog_postmainboard_lines_1_PRE_pos_6,
187Mux_analog_postmainboard_lines_0_PRE_neg_1,Mux_analog_postmainboard_lines_0_PRE_neg_2,
188Mux_analog_postmainboard_lines_0_PRE_neg_3,Mux_analog_postmainboard_lines_0_PRE_neg_4,
189Mux_analog_postmainboard_lines_0_PRE_neg_5,Mux_analog_postmainboard_lines_0_PRE_neg_6,
191Mux_analog_postmainboard_lines_2_Vcc_meas,
193Mux_analog_postmainboard_lines_3_Vee_meas,
195Mux_analog_postmainboard_lines_3_Vdig_5V_meas,
197Mux_analog_postmainboard_lines_1_SenseVreg_n,
199Mux_analog_postmainboard_lines_1_SenseVreg_p,
201Mux_analog_postmainboard_lines_2_SenseGA,
203Mux_analog_postmainboard_lines_0_Analog_Mux_1_out,
205Mux_analog_postmainboard_lines_0_Analog_Mux_2_out,
207Mux_analog_postmainboard_lines_0_Analog_Mux_1_out,Mux_analog_postmainboard_lines_0_Analog_Mux_1_out,
208Mux_analog_postmainboard_lines_0_Analog_Mux_1_out,Mux_analog_postmainboard_lines_0_Analog_Mux_1_out,
209Mux_analog_postmainboard_lines_0_Analog_Mux_1_out,Mux_analog_postmainboard_lines_0_Analog_Mux_1_out,
210Mux_analog_postmainboard_lines_0_Analog_Mux_1_out,Mux_analog_postmainboard_lines_0_Analog_Mux_1_out,
212Mux_analog_postmainboard_lines_0_Analog_Mux_2_out,Mux_analog_postmainboard_lines_0_Analog_Mux_2_out,
213Mux_analog_postmainboard_lines_0_Analog_Mux_2_out,Mux_analog_postmainboard_lines_0_Analog_Mux_2_out,
214Mux_analog_postmainboard_lines_0_Analog_Mux_2_out,Mux_analog_postmainboard_lines_0_Analog_Mux_2_out,
215Mux_analog_postmainboard_lines_0_Analog_Mux_2_out,Mux_analog_postmainboard_lines_0_Analog_Mux_2_out,
217Mux_analog_postmainboard_lines_0_Analog_Mux_2_out,
219Mux_analog_postmainboard_lines_0_Analog_Mux_2_out,
221Mux_analog_postmainboard_lines_0_Analog_Mux_2_out,
223Mux_analog_postmainboard_lines_2_PGA_Output_pos_3};
287 status= PIN_Configure(
LED_Green.porta_num,
LED_Green.pin_num, PIN_FUNC_0, PIN_PINMODE_PULLUP, PIN_PINMODE_NORMAL);
291 status= PIN_Configure(
LED_Red.porta_num,
LED_Red.pin_num, PIN_FUNC_0, PIN_PINMODE_PULLUP, PIN_PINMODE_NORMAL);
313 for (ii=0;ii<8;ii++){
319 for (ii=0;ii<2;ii++){
366 status= PIN_Configure(
ADC_ready_up.porta_num,
ADC_ready_up.pin_num, PIN_FUNC_0,PIN_PINMODE_PULLUP, PIN_PINMODE_NORMAL);
373 status= PIN_Configure(
ADC_reset_up.porta_num,
ADC_reset_up.pin_num , PIN_FUNC_0, PIN_PINMODE_PULLUP, PIN_PINMODE_NORMAL);
419 for (iii=0; iii<8;iii++){
674 status= PIN_Configure(Porta_Led_verde, Led_verde, PIN_FUNC_0, PIN_PINMODE_PULLUP, PIN_PINMODE_NORMAL);
675 GPIO_SetDir(Porta_Led_verde, Led_verde, GPIO_DIR_OUTPUT);
const porta_pin_def ADC_reset_down
Configuration ADC pin.
const porta_pin_def Mux_enable_postmainboard_1
location of the chip select pin of analog mux 1 of postmainboard, 0=off
const porta_pin_def ADC_ready_down
Configuration ADC pin.
const porta_pin_def Mux_select_word_2
selettore 2 del pin di ingresso dell'analog mux
const porta_pin_def Reset_I2C_mux_down
location of the reset pin of the I2C_mux of frontend board su or giu
const porta_pin_def Mux_enable_postmainboard_7
location of the chip select pin of analog mux 7 of postmainboard, 0=off
const porta_pin_def LED_Red
Green LED.
void LED_pin_configuration(void)
Red and Green LED pin configuration and reset.
const porta_pin_def Mux_enable_postmainboard_3
location of the chip select pin of analog mux 3 of postmainboard, 0=off
const porta_pin_def Mux_enable_postmainboard_8
location of the chip select pin of analog mux 8 of postmainboard, 0=off
void ADC_pin_configurations(void)
ADc pins are initialized here.
const porta_pin_def Mux_select_word_1
selettore 1 del pin di ingresso dell'analog mux
const porta_pin_def ADC_Chip_Sel_up
Configuration ADC pin.
const uint8_t ADC_node_map[]
Mapping to mux's on postmainboard. Its syntax: bits 0 to 3 are common to all the MUXs and select one ...
const porta_pin_def Reset_I2C_mux_up
location of the reset pin of the I2C_mux of frontend board su or giu
const porta_pin_def ADC_ready_up
Configuration ADC pin.
const porta_pin_def Mux_select_word_0
selettore 0 del pin di ingresso dell'analog mux
void Configure_Reset_selection_port_analog_mux_ResIn_ADC_buffer(void)
Set the reset pins of te analog mux's. Take care: reset=0 means output off.
const porta_pin_def Mux_enable_postmainboard_5
location of the chip select pin of analog mux 5 of postmainboard, 0=off
const porta_pin_def LED_Green
Green LED.
void Configure_Reset_I2C_mux(void)
Set the reset pins of te I2C mux, reset the I2C mux and put them into operation.
const porta_pin_def Reset_I2C_mux_postfrontend_up
location of the reset pin of the I2C_mux of post-frontend board su or giu
void Configure_Bit_Address_for_CAN(void)
Switches for the selection of the hw CAN bus address. Pin are set as input with internal pull-up.
void Configure_Led_verde(void)
ADC map for reading nodes on postmainboard.
const porta_pin_def ADC_ResIn_A_buffer_down
Refernce to fgnd of theADC input buffer, if 1 there is a 10kOhm connected to GND.
const porta_pin_def CAN_indirizzo_hw[]
hw Can address
const porta_pin_def Mux_enable_postmainboard_6
location of the chip select pin of analog mux 6 of postmainboard, 0=off
const porta_pin_def ADC_ResIn_A_buffer_up
Refernce to fgnd of theADC input buffer, if 1 there is a 10kOhm connected to GND.
const porta_pin_def Mux_enable_postmainboard_4
location of the chip select pin of analog mux 4 of postmainboard, 0=off
const porta_pin_def ADC_Chip_Sel_down
Configuration ADC pin.
const porta_pin_def Mux_enable_postmainboard_2
location of the chip select pin of analog mux 2 of postmainboard, 0=off
const porta_pin_def ADC_ResIn_B_buffer_down
Refernce to fgnd of theADC input buffer, if 1 there is a 10kOhm connected to GND.
const porta_pin_def Reset_I2C_mux_postfrontend_down
location of the reset pin of the I2C_mux of post-frontend board su or giu
const porta_pin_def ADC_ResIn_B_buffer_up
Refernce to fgnd of theADC input buffer, if 1 there is a 10kOhm connected to GND.
const porta_pin_def ADC_reset_up
Configuration ADC pin.
#define porta_0
Port 0 pin usage.
#define porta_1
Port 1 pin usage.
#define pin_Reset_I2C_mux_B
#define pin_Reset_I2C_mux_A
#define porta_2
Port 2 pin usage.
void Aspetta_tanti_ms(int millisecondi)
The timing function.