public bool ListFrequency(double frequency, double pulseWidth) { if (this.CtlGetStatus(RtcStatus.Aborted)) { return(false); } double period = 1.0f / frequency * (double)1.0e6; double halfPeriod = period / 2.0f; if (!this.IsListReady(1)) { return(false); } RTC5Wrap.n_set_laser_timing(this.Index + 1, (uint)(halfPeriod * 64.0), (uint)(pulseWidth * 64.0), 0, 0); return(true); }
public bool CtlFrequency(double frequency, double pulseWidth) { if (this.CtlGetStatus(RtcStatus.Busy)) { return(false); } double period = 1.0f / frequency * (double)1.0e6; double halfPeriod = period / 2.0f; RTC5Wrap.n_set_start_list(this.Index + 1, 1); RTC5Wrap.n_set_laser_timing(this.Index + 1, (uint)(halfPeriod * 64.0), (uint)(pulseWidth * 64.0), 0, 0); RTC5Wrap.n_set_end_of_list(this.Index + 1); RTC5Wrap.n_execute_list(this.Index + 1, 1); this.CtlBusyWait(); return(true); }