Example #1
0
        } // btneepromread1_click

        private void btnTune_Click(object sender, EventArgs e)
        {
            if (txtTune.Text == "")
            {
                return;
            }

            double freq;
            bool   b = double.TryParse(txtTune.Text, out freq);

            if (!b)
            {
                return;
            }

            uint ftw = (uint)(Math.Pow(2.0, 32) * freq * 2 / 384.0);

            HiPerfTimer t1 = new HiPerfTimer();

            t1.Start();

            int val = USBHID.SetFreqTW(ftw);

            t1.Stop();
            Debug.WriteLine("Tune: " + val + "  (" + t1.DurationMsec.ToString("f2") + ")");
        }