OPT3101_configuration.cpp void OPT3101::device::initialize(void) { this->reg.tg_ovl_window_start = 7000; // //Overload flab observation window this->reg.en_temp_conv = 1; // //Enables the internal this->reg.clip_mode_fc = 1; // //Enables Clip mode for Frequency correction this->reg.clip_mode_temp = 0; // //Disables Clip mode for Temp coff phase correction this->reg.clip_mode_offset = 0; // //Disables Clip mode for phase offset correction this->reg.iq_read_data_sel = 3; // //Enables 16 bit frame counter this->reg.iamb_max_sel = 5; // //Sets maximum ambient support this->reg.en_temp_corr = 0; // //Enables Temperature Correction this->reg.gpio1_obuf_en = 1; // //Enabled output buffer on GPIO1 pin this->reg.gpo1_mux_sel = 2; // //select dig_gpo_0 on gpio1 this->reg.dig_gpo_sel0 = 9; // //Select Data Ready on dig_gpo_0 this->reg.en_cont_fcalib = 1; // //Enables continuous frequency calibration this->reg.start_freq_calib = 1; // //Starts the frequency calibration block this->reg.en_floop = 1; // //Enables the frequency correction loop this->reg.en_auto_freq_count = 1; // //Enables automatic frequency count this->reg.en_freq_corr = 1; // //Enables digital frequency correction this->reg.sys_clk_divider = 8; // //Divider for system clock this->reg.ref_count_limit = 20480; // //Counter limit this->reg.gpio2_obuf_en = 0; // //Disables output buffer on GPIO2 this->reg.gpio2_ibuf_en = 1; // //Enables ref clock input of GPIO2 #ifdef AVG512 this->reg.num_sub_frames = 511; // //Sub frames count this->reg.num_avg_sub_frames = 511; // //Average frames count this->reg.xtalk_filt_time_const = 1; // //Crosstalk filter time constant this->reg.tg_seq_int_start = 9850; // //Sequence Start this->reg.tg_seq_int_end = 9858; // //Sequence End this->reg.tg_seq_int_mask_start = 511; // //Same as AvgFrame Count this->reg.tg_seq_int_mask_end = 511; // //Same as AvgFrame Count #endif #ifdef AVG4096 this->reg.num_sub_frames = 4095; // //Sub frames count this->reg.num_avg_sub_frames = 4095; // //Average frames count this->reg.xtalk_filt_time_const = 0; // //Crosstalk filter time constant this->reg.tg_seq_int_start = 9850; // //Sequence Start this->reg.tg_seq_int_end = 9858; // //Sequence End this->reg.tg_seq_int_mask_start = 4095; // //Same as AvgFrame Count this->reg.tg_seq_int_mask_end = 4095; // //Same as AvgFrame Count #endif this->reg.hdr_thr_high = 25500; // //High Threshold this->reg.hdr_thr_low = 10650; this->reg.en_adaptive_hdr = 1; this->reg.illum_dac_h_tx0 = 18; // //High Current settings [100.8mA:5.6mA X 18] this->reg.illum_scale_h_tx0 = 0; // //Illum scale for H [100.8mA:5.6mA X 18] this->reg.illum_dac_l_tx0 = 13; // //High Current settings [054.6mA:4.2mA X 13] this->reg.illum_scale_l_tx0 = 1; // //Illum scale for H [054.6mA:4.2mA X 13] this->reg.illum_dac_h_tx1 = 18; // //High Current settings [100.8mA:5.6mA X 18] //NEW this->reg.illum_scale_h_tx1 = 0; // //Illum scale for H [100.8mA:5.6mA X 18] //NEW this->reg.illum_dac_l_tx1 = 13; // //High Current settings [054.6mA:4.2mA X 13] //NEW this->reg.illum_scale_l_tx1 = 1; // //Illum scale for H [054.6mA:4.2mA X 13] //NEW this->reg.illum_dac_h_tx2 = 18; // //High Current settings [100.8mA:5.6mA X 18] //NEW this->reg.illum_scale_h_tx2 = 0; // //Illum scale for H [100.8mA:5.6mA X 18] //NEW this->reg.illum_dac_l_tx2 = 13; // //High Current settings [054.6mA:4.2mA X 13] //NEW this->reg.illum_scale_l_tx2 = 1; // //Illum scale for H [054.6mA:4.2mA X 13] //NEW this->reg.tx_seq_reg = 2340; // //Setting TX Switching order this->reg.en_tx_switch = 1; // //Enable TX Switching order this->reg.tg_en = 1; // //Enables Timing Generator #ifdef AVG512 this->configurationFlags_xtalkFilterTau = 1; // //This is not a register but a settings flag for the SDK this->configurationFlags_monoshotMode = false; // //This is not a register but a settings flag for the SDK this->configurationFlags_xtalkSettlingOneTauInMilliSeconds = 256; // //This is not a register but a settings flag for the SDK this->configurationFlags_xtalkSettlingOneTauInDataReadyCounts = 2; // //This is not a register but a settings flag for the SDK this->configurationFlags_frameTimeInMilliSeconds = 128; // //This is not a register but a settings flag for the SDK this->configurationFlags_avgFrameCountExponentOfTwo = 9; // //This is not a register but a settings flag for the SDK #endif #ifdef AVG4096 this->configurationFlags_xtalkFilterTau = 0; // //This is not a register but a settings flag for the SDK this->configurationFlags_monoshotMode = false; // //This is not a register but a settings flag for the SDK this->configurationFlags_xtalkSettlingOneTauInMilliSeconds = 1024; // //This is not a register but a settings flag for the SDK this->configurationFlags_xtalkSettlingOneTauInDataReadyCounts = 1; // //This is not a register but a settings flag for the SDK this->configurationFlags_frameTimeInMilliSeconds = 1024; // //This is not a register but a settings flag for the SDK this->configurationFlags_avgFrameCountExponentOfTwo = 12; // //This is not a register but a settings flag for the SDK #endif } OPT3101::device::device(void) : configurationFlags_isTXChannelActive{true,true,true}, // MODIF configurationFlags_isRegisterSetActive{true,true} {}