Example #1
0
 public static void Initialize(Cpu.Pin PortId)
 {
     if (_this == null)
     {
         _this = new CapacitiveTouchController(PortId);
     }
 }
Example #2
0
        //Hashtable Screens { set; get; }
        // This method is run when the mainboard is powered up or reset.
        void ProgramStarted()
        {
            Debug.Print("Program Started");

            //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.Socket14.Pin3);

            /*
             * Screens = new Hashtable();
             * //populate all form
             * var F1 = new SplashForm(ref MainWindow);
             * F1.FormRequestEvent += General_FormRequestEvent;
             * Screens.Add(Screen.ScreenTypes.Splash, F1);
             *
             * var F2 = new PromptForm(ref MainWindow, ref displayNHVN, ref sdCard, ref usbHost, ref usbClientEDP, ref wifiRS21);
             * F2.FormRequestEvent += General_FormRequestEvent;
             * Screens.Add(Screen.ScreenTypes.Prompt, F2);
             */
            Glide.FitToScreen = true;
            GlideTouch.Initialize();

            //load splash
            LoadForm(Screen.ScreenTypes.Splash);
        }