/// <summary>
 /// Configure the onboard display controller to fulfil the requirements of a display using the RGB sockets.
 /// If doing this requires rebooting, then the method must reboot and not return.
 /// If there is no onboard display controller, then NotSupportedException must be thrown.
 /// </summary>
 /// <param name="displayModel">Display model name.</param>
 /// <param name="width">Display physical width in pixels, ignoring the orientation setting.</param>
 /// <param name="height">Display physical height in lines, ignoring the orientation setting.</param>
 /// <param name="orientationDeg">Display orientation in degrees.</param>
 /// <param name="timing">The required timings from an LCD controller.</param>
 protected override void OnOnboardControllerDisplayConnected(string displayModel, int width, int height, int orientationDeg, GT.Modules.Module.DisplayModule.TimingRequirements timing)
 {
     throw new NotSupportedException("This mainboard does not support an onboard display controller.");
 }
Esempio n. 2
0
        /// <summary>
        /// Configure the onboard display controller to fulfil the requirements of a display using the RGB sockets. If doing this requires rebooting, then the method must reboot and not return. If
        /// there is no onboard display controller, then NotSupportedException must be thrown.
        /// </summary>
        /// <param name="displayModel">Display model name.</param>
        /// <param name="width">Display physical width in pixels, ignoring the orientation setting.</param>
        /// <param name="height">Display physical height in lines, ignoring the orientation setting.</param>
        /// <param name="orientationDeg">Display orientation in degrees.</param>
        /// <param name="timing">The required timings from an LCD controller.</param>
        protected override void OnOnboardControllerDisplayConnected(string displayModel, int width, int height, int orientationDeg, GTM.Module.DisplayModule.TimingRequirements timing)
        {
            switch (orientationDeg)
            {
            case 0: Display.CurrentRotation = Display.Rotation.Normal; break;

            case 90: Display.CurrentRotation = Display.Rotation.Clockwise90; break;

            case 180: Display.CurrentRotation = Display.Rotation.Half; break;

            case 270: Display.CurrentRotation = Display.Rotation.CounterClockwise90; break;

            default: throw new ArgumentOutOfRangeException("orientationDeg", "orientationDeg must be 0, 90, 180, or 270.");
            }

            Display.Height = height;
            Display.HorizontalBackPorch      = timing.HorizontalBackPorch;
            Display.HorizontalFrontPorch     = timing.HorizontalFrontPorch;
            Display.HorizontalSyncPolarity   = timing.HorizontalSyncPulseIsActiveHigh;
            Display.HorizontalSyncPulseWidth = timing.HorizontalSyncPulseWidth;
            Display.OutputEnableIsFixed      = timing.UsesCommonSyncPin;         //not the proper property, but we needed it;
            Display.OutputEnablePolarity     = timing.CommonSyncPinIsActiveHigh; //not the proper property, but we needed it;
            Display.PixelClockRateKHz        = (int)timing.MaximumClockSpeed;
            Display.PixelPolarity            = timing.PixelDataIsValidOnClockRisingEdge;
            Display.VerticalBackPorch        = timing.VerticalBackPorch;
            Display.VerticalFrontPorch       = timing.VerticalFrontPorch;
            Display.VerticalSyncPolarity     = timing.VerticalSyncPulseIsActiveHigh;
            Display.VerticalSyncPulseWidth   = timing.VerticalSyncPulseWidth;
            Display.Width = width;

            if (Display.Save())
            {
                Debug.Print("Updating display configuration. THE MAINBOARD WILL NOW REBOOT.");
                Debug.Print("To continue debugging, you will need to restart debugging manually (Ctrl-Shift-F5)");

                Microsoft.SPOT.Hardware.PowerState.RebootDevice(false);
            }
        }
Esempio n. 3
0
 /// <summary>
 /// Configure the onboard display controller to fulfil the requirements of a display using the RGB sockets. If doing this requires rebooting, then the method must reboot and not return. If
 /// there is no onboard display controller, then NotSupportedException must be thrown.
 /// </summary>
 /// <param name="displayModel">Display model name.</param>
 /// <param name="width">Display physical width in pixels, ignoring the orientation setting.</param>
 /// <param name="height">Display physical height in lines, ignoring the orientation setting.</param>
 /// <param name="orientationDeg">Display orientation in degrees.</param>
 /// <param name="timing">The required timings from an LCD controller.</param>
 protected override void OnOnboardControllerDisplayConnected(string displayModel, int width, int height, int orientationDeg, GTM.Module.DisplayModule.TimingRequirements timing)
 {
     throw new NotSupportedException();
 }