Пример #1
0
 public static void Initialize(Cpu.Pin PortId)
 {
     if (_this == null)
     {
         _this = new CapacitiveTouchController(PortId);
     }
 }
Пример #2
0
        // This method is run when the mainboard is powered up or reset.
        void ProgramStarted()
        {
            multicolorLED.BlinkOnce(GT.Color.Red);

            //7" Displays
            Display.Width  = 800;
            Display.Height = 480;
            Display.OutputEnableIsFixed      = false;
            Display.OutputEnablePolarity     = true;
            Display.PixelPolarity            = false;
            Display.PixelClockRateKHz        = 30000;
            Display.HorizontalSyncPolarity   = false;
            Display.HorizontalSyncPulseWidth = 48;
            Display.HorizontalBackPorch      = 88;
            Display.HorizontalFrontPorch     = 40;
            Display.VerticalSyncPolarity     = false;
            Display.VerticalSyncPulseWidth   = 3;
            Display.VerticalBackPorch        = 32;
            Display.VerticalFrontPorch       = 13;
            Display.Type = Display.DisplayType.Lcd;
            if (Display.Save())      // Reboot required?
            {
                PowerState.RebootDevice(false);
            }
            //set up touch screen
            CapacitiveTouchController.Initialize(GHI.Pins.FEZRaptor.Socket13.Pin3);
            //displayNHVN.Configure7InchDisplay();

            window = GlideLoader.LoadWindow(Resources.GetString(Resources.StringResources.MyForm));
            //glide init
            GlideTouch.Initialize();

            btnReset = (GHI.Glide.UI.Button)window.GetChildByName("btnReset");
            dataGrid = (GHI.Glide.UI.DataGrid)window.GetChildByName("dataGrid");

            Glide.MainWindow = window;
            Thread th1 = new Thread(new ThreadStart(Looping));

            th1.Start();
        }