Example #1
0
HRESULT QEvrVideoOverlay::ShutdownObject()
{
    setDisplayControl(0);

    if (m_presenter) {
        m_presenter->Release();
        m_presenter = 0;
    }
    return S_OK;
}
Example #2
0
// IMFActivate
HRESULT QEvrVideoOverlay::ActivateObject(REFIID riid, void **ppv)
{
    if (riid != __uuidof(IMFVideoPresenter)) {
        return E_NOINTERFACE;
    } else if (!ptrMFCreateVideoPresenter) {
        return E_NOINTERFACE;
    } else if (m_presenter) {
        *ppv = m_presenter;

        return S_OK;
    } else {
        IMFVideoDisplayControl *displayControl = 0;

        IMFGetService *service;
        HRESULT hr;
        if ((hr = (*ptrMFCreateVideoPresenter)(
                0,
                __uuidof(IDirect3DDevice9),
                __uuidof(IMFVideoPresenter),
                reinterpret_cast<void **>(&m_presenter))) != S_OK) {
            qWarning("failed to create video presenter");
        } else if ((hr = m_presenter->QueryInterface(
                __uuidof(IMFGetService), reinterpret_cast<void **>(&service))) != S_OK) {
            qWarning("failed to query IMFGetService interface");
        } else {
            if ((hr = service->GetService(
                    MR_VIDEO_RENDER_SERVICE,
                    __uuidof(IMFVideoDisplayControl),
                    reinterpret_cast<void **>(&displayControl))) != S_OK) {
                qWarning("failed to get IMFVideoDisplayControl service");
            }
            service->Release();
        }

        setDisplayControl(displayControl);

        if (m_presenter && hr != S_OK) {
            m_presenter->Release();
            m_presenter = 0;
        }

        *ppv = m_presenter;

        return hr;
    }
}
Example #3
0
void ST7032::begin(uint8_t cols, uint8_t lines, uint8_t dotsize) {

  _displayfunction  = LCD_8BITMODE | LCD_1LINE | LCD_5x8DOTS;
  
  if (lines > 1) {
    _displayfunction |= LCD_2LINE;
  }
  _numlines = lines;
  _currline = 0;

  // for some 1 line displays you can select a 10 pixel high font
  if ((dotsize != 0) && (lines == 1)) {
    _displayfunction |= LCD_5x10DOTS;
  }
  
  Wire.begin();
  delay(40);               // Wait time >40ms After VDD stable

  // finally, set # lines, font size, etc.
  normalFunctionSet();

  extendFunctionSet();
  command(LCD_EX_SETBIASOSC | LCD_BIAS_1_5 | LCD_OSC_183HZ);            // 1/5bias, [email protected]
  command(LCD_EX_FOLLOWERCONTROL | LCD_FOLLOWER_ON | LCD_RAB_2_00);     // internal follower circuit is turn on
  delay(200);                                       // Wait time >200ms (for power stable)
  normalFunctionSet();

  // turn the display on with no cursor or blinking default
//  display();
  _displaycontrol   = 0x00;//LCD_DISPLAYON | LCD_CURSOROFF | LCD_BLINKOFF;
  setDisplayControl(LCD_DISPLAYON | LCD_CURSOROFF | LCD_BLINKOFF);

  // clear it off
  clear();

  // Initialize to default text direction (for romance languages)
//  command(LCD_ENTRYMODESET | _displaymode);
  _displaymode      = 0x00;//LCD_ENTRYLEFT | LCD_ENTRYSHIFTDECREMENT;
  setEntryMode(LCD_ENTRYLEFT | LCD_ENTRYSHIFTDECREMENT);
}
Example #4
0
long ddk750_setLogicalDispOutput(
    disp_output_t output,
    unsigned char swapDisplay
)
{
    unsigned long ulReg;

    switch (output)
    {
        case NO_DISPLAY:
        {        
            	/* 
            		In here, all the display device has to be turned off first before the
               		the display control. 
               	*/
            	setDisplayControl(PANEL_CTRL, DISP_OFF);    /* Turn off Panel control */
            	setDisplayControl(CRT_CTRL, DISP_OFF);      /* Turn off CRT control */
	        setDisplayControl(VGA_CTRL, DISP_OFF);      /* Turn off VGA control */
               
            	swPanelPowerSequence(DISP_OFF, 4);          /* Turn off Panel */
            	setDAC(DISP_OFF);                           /* Turn off DAC */
            	ddk750_setDPMS(DPMS_OFF);                          /* Turn off DPMS */            
            	setDualPanel(0);                            /* Turn off Panel 2 */    			
			
            	setPath(PANEL_PATH, PANEL_CTRL, DISP_OFF);  /* Turn off Panel path */
            	setPath(CRT_PATH, PANEL_CTRL, DISP_OFF);    /* Turn off CRT path */
            	break;
        }    
        case PANEL1_ONLY:
        {         
		/*PANEL1 only	(24 or 36 bit TFT) show primary controller data	*/
            	setDisplayControl(PANEL_CTRL, DISP_ON);     /* Turn on Panel control */            	
            	setDisplayControl(CRT_CTRL, DISP_OFF);  /* Turn off CRT control */ 
		setDisplayControl(VGA_CTRL, DISP_OFF);      /* Turn off VGA control */

		swPanelPowerSequence(DISP_ON, 4);           /* Turn on Panel */
           	setDAC(DISP_OFF);                           /* Turn off DAC */		
            	ddk750_setDPMS(DPMS_OFF);                          /* Turn off DPMS */            
            	setDualPanel(0);                            /* Turn off Panel 2 */            
            
            	setPath(PANEL_PATH, PANEL_CTRL, DISP_ON);   /* Turn on Panel Path and use panel data */
            	setPath(CRT_PATH, CRT_CTRL, DISP_ON);    /* Turn CRT path to secondary controller */            
            	break;
        }    
        case CRT1_CRT2_SIMUL:
        {            
		/* 	CRT1,2 show primary controller data	*/
            	setDisplayControl(PANEL_CTRL, DISP_ON);     /* Turn on Panel Control */
            	setDisplayControl(CRT_CTRL, DISP_OFF);      /* Turn off CRT control */
		setDisplayControl(VGA_CTRL, DISP_OFF);      /* Turn off VGA control */            

			
	    	swPanelPowerSequence(DISP_OFF, 4);          /* Turn off Panel */
		/* set bit 25 of 0x80000 to 1 can driver DVI-CRT with out turn on PANEL	*/
		pokeRegisterDWord(PANEL_DISPLAY_CTRL,FIELD_SET(peekRegisterDWord(PANEL_DISPLAY_CTRL),
							PANEL_DISPLAY_CTRL,DATA,ENABLE));
		
            	setDAC(DISP_ON);                            /* Turn on DAC */
            	ddk750_setDPMS(DPMS_ON);                           /* Turn on DPMS to drive CRT */				
            	setDualPanel(0);                            /* Turn off Panel 2 */           
				
            	setPath(PANEL_PATH, PANEL_CTRL, DISP_ON);  /* Turn off Panel Path */
            	setPath(CRT_PATH, PANEL_CTRL, DISP_ON);     /* Turn off CRT Path and use panel data */
            	break;
        }
        case PANEL_CRT_SIMUL:
        {            
		/* 
			Panel1 (18,24,36 bit TFT) and CRT1,2 show same content with primary controller
			panel type is none of my bussiness,pleae set it out side
			if 18-bit TFT selected then this option means PANEL1 + PANEL2 + CRTs
		*/
            	setDisplayControl(PANEL_CTRL, DISP_ON);     /* Turn on Panel Control */
            	setDisplayControl(CRT_CTRL, DISP_OFF);  /* Turn off CRT control */
            	setDisplayControl(VGA_CTRL, DISP_OFF);      /* Turn off VGA control */
		
            	swPanelPowerSequence(DISP_ON, 4);           /* Turn on Panel */		
            	setDAC(DISP_ON);                            /* Turn on DAC */
            	ddk750_setDPMS(DPMS_ON);                           /* Turn on DPMS to drive CRT */            
            
            	setPath(PANEL_PATH, PANEL_CTRL, DISP_ON);   /* Turn on Panel Path and use panel data */
            	setPath(CRT_PATH, PANEL_CTRL, DISP_ON);     /* Turn on CRT Path and use panel data */            
            	break;
        }    
	case PANEL_CRT_SIMUL_SEC:
	{
		/*	like above but show secondary controller data	*/
            	setDisplayControl(PANEL_CTRL, DISP_OFF);     /* Turn OFF Panel Control */
            	setDisplayControl(CRT_CTRL, DISP_ON);  /* Turn ON CRT control */
            	setDisplayControl(VGA_CTRL, DISP_OFF);      /* Turn off VGA control */
		
            	swPanelPowerSequence(DISP_ON, 4);           /* Turn on Panel */			
            	setDAC(DISP_ON);                            /* Turn on DAC */
            	ddk750_setDPMS(DPMS_ON);                           /* Turn on DPMS to drive CRT */            
            
            	setPath(PANEL_PATH, CRT_CTRL, DISP_ON);   /* Turn ON Panel Path and use secondary ctrl 	*/
            	setPath(CRT_PATH, CRT_CTRL, DISP_ON);     /* Turn on CRT Path and use secondary ctrl	 */            
            	break;		
	}
	case PANEL1_PANEL2_SIMUL:
	{
		/*	dual 18 bit TFT show primary controller data	*/
            	setDisplayControl(PANEL_CTRL, DISP_ON);     /* Turn ON Panel Control */
            	setDisplayControl(CRT_CTRL, DISP_OFF);  /* Turn OFF CRT control */
            	setDisplayControl(VGA_CTRL, DISP_OFF);      /* Turn off VGA control */
		
            	swPanelPowerSequence(DISP_ON, 4);           /* Turn on Panel */			
            	setDAC(DISP_OFF);                            /* Turn on DAC */
            	ddk750_setDPMS(DPMS_OFF);                           /* Turn on DPMS to drive CRT */          
		setPanelType(TFT_18BIT);
            
            	setPath(PANEL_PATH, PANEL_CTRL, DISP_ON);   /* Turn ON Panel Path and use secondary ctrl 	*/
            	setPath(CRT_PATH, PANEL_CTRL, DISP_ON);     /* Turn on CRT Path and use secondary ctrl	 */            
            	break;
	}
        case PANEL_CRT_DUAL: 
        {
		/*
			view1:PANEL1 + DVI-CRT 
			view2:VGA-CRT 
		*/
            	setDisplayControl(PANEL_CTRL, DISP_ON);     /* Turn on Panel Control */
            	setDisplayControl(CRT_CTRL, DISP_ON);       /* Turn on CRT control */
            	setDisplayControl(VGA_CTRL, DISP_OFF);      /* Turn off VGA control */
		
            	swPanelPowerSequence(DISP_ON, 4);           /* Turn on Panel */
            	setDAC(DISP_ON);                            		/* Turn on DAC */
            	ddk750_setDPMS(DPMS_ON);                       /* Turn on DPMS to drive CRT */            
            	setDualPanel(0);                            			/* Turn off Panel 2 */
			
            	if (swapDisplay == 1)
            	{                        		
                	setPath(PANEL_PATH, CRT_CTRL, DISP_ON);     /* Turn on Panel Path and use CRT data */
                	setPath(CRT_PATH, PANEL_CTRL, DISP_ON);     /* Turn on CRT Path and use Panel data */              
            	}
            	else
            	{
                	setPath(PANEL_PATH, PANEL_CTRL, DISP_ON);   /* Turn on Panel Path and use panel data */
                	setPath(CRT_PATH, CRT_CTRL, DISP_ON);       /* Turn on CRT Path and use CRT data */
            	}            
            	break;
        }    
    }
    return 0;
}
Example #5
0
void ST7032::blink() {
  setDisplayControl(LCD_BLINKON);
}
Example #6
0
void ST7032::cursor() {
  setDisplayControl(LCD_CURSORON);
}
Example #7
0
void ST7032::display() {
  setDisplayControl(LCD_DISPLAYON);
}