/* Clear part of LCD by same color */ void clearPartColor(uint8_t address, uint8_t count, TColor backColor) { TColor tempColor; tempColor = backColor; setBackColor(backColor); clearPart(address, count); setBackColor(tempColor); }
void SButton::update() { ftUI::Button::update(); int st = getState(); if (st == FT_isOn) { setForeColor(FT_White); setBackColor(ftColor("#0099CC")); } else if (st == FT_isDown || st == FT_ButtonDown || st == FT_ButtonUp) { setForeColor(FT_Yellow); setBackColor(ftColor("#0099CC")); } else { setForeColor(FT_White); setBackColor(FT_Black); } }
void UTFT::InitLCD(byte orientation) { orient=orientation; _hw_special_init(); sbi(P_RST, B_RST); delay(5); cbi(P_RST, B_RST); delay(15); sbi(P_RST, B_RST); delay(15); cbi(P_CS, B_CS); switch(display_model) { #ifndef DISABLE_ILI9327 #include "tft_drivers/ili9327/initlcd.h" #endif #ifndef DISABLE_HX8352A #include "tft_drivers/hx8352a/initlcd.h" #endif } sbi (P_CS, B_CS); setColor(255, 255, 255); setBackColor(0, 0, 0); cfont.font=0; _transparent = false; }
void cubeConfiguration::on_bt_backColor_clicked() { QColorDialog *colorDialog = new QColorDialog(m_cube->getdefaultColor(), this); connect(colorDialog, SIGNAL(currentColorChanged(QColor)), m_cube, SLOT(setBackColor(QColor))); colorDialog->show(); }
void Screen::setDefaultRendition() { setForeColor(COLOR_SPACE_DEFAULT,DEFAULT_FORE_COLOR); setBackColor(COLOR_SPACE_DEFAULT,DEFAULT_BACK_COLOR); currentRendition = DEFAULT_RENDITION; updateEffectiveRendition(); }
void CDisplayView::mouse(CDrawContext *dstcon, CPoint &where) { unsigned long delta=250, ticks = getParent()->getTicks(); bool dblclick = false; long button = dstcon->getMouseButtons(); if (!(button & kLButton)) { return; } dblclick = (ticks-stTicks)<delta; stTicks = ticks; if(dblclick) { if(mEdit) { getParent()->setEditView(this); setBackColor(kGreyCColor); setFontColor(kWhiteCColor); setText(mText); takeFocus(dstcon); mDrawText = true; } } else { if(mParentView) { mParentView->notify(mView,(const char *)VNTF_MOUSE); mParentView->mouse(dstcon,where); } } }
//--------------------------------------------------------------------------------- // TouchScreenController //--------------------------------------------------------------------------------- TouchScreenController::TouchScreenController() { _touchScreen = new TouchScreen(XP, YP, XM, YM, 300); _tft = &Tft; _screenWidth = SCREEN_WIDTH; _screenHeight = SCREEN_HEIGHT; setBackColor(0x0000); }
void UTFT::InitLCD(byte orientation) { pinMode(__p1,OUTPUT); pinMode(__p2,OUTPUT); pinMode(__p3,OUTPUT); pinMode(__p4,OUTPUT); _set_direction_registers(display_transfer_mode); orient=orientation; _hw_special_init(); sbi(P_RST, B_RST); delay(5); cbi(P_RST, B_RST); delay(15); sbi(P_RST, B_RST); delay(15); switch(display_model) { #include "tft_drivers/ili9325c/initlcd.h" } setColor(255, 255, 255); setBackColor(0, 0, 0); cfont.font=0; _transparent = false; }
void main() { lcdInit(); spiOn(); spiOff(); sendByte(out); sendArray(array); lcdOn(); lcdOff(); sendBuffer(); sendPart(3, 7, LCD_Buffer); clear(); clearPart(5, 76); clearPartColor(5, 76, clBLACK); setPenColor(clBLACK); setBackColor(clWHITE); delay_nsek(40); scsOn(); scsOff(); i = getValue(LCD_Buffer, 23, 266); setValue(LCD_Buffer, 23, 266, 0x3F); setCharge(); resetCharge(); drawPixel(5, 5, LCD_Buffer); drawVLine(5, 5, 5, LCD_Buffer); drawHLine(5, 5, 5, LCD_Buffer); drawLine(5, 5, 55, 55, LCD_Buffer); drawRect(5, 5, 55, 55, LCD_Buffer); drawFillRect(5, 5, 55, 55, clWHITE, LCD_Buffer); drawCircle(10, 10, 5, LCD_Buffer); }
bool MyObj::setSlotBackColor(const oe::base::Identifier* const x) { bool ok = false; if (x != nullptr) { ok = setBackColor(x); } return ok; }
GuiCustomTextLabel::GuiCustomTextLabel(const CRect& size, UTF8StringPtr txt, const CFontRef& font, const CHoriTxtAlign& textAlign, const CColor& backgroundColor, const CColor& frameColor) : CTextLabel(size, txt, 0, 0) { setBackColor(backgroundColor); setFrameColor(frameColor); setFont(font); setHoriAlign(textAlign); }
void MyObj::deleteData() { setColorTable(nullptr); setTextColor(nullptr); setBackColor(nullptr); setVector(nullptr); setMessage(nullptr); }
int GraphView::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = CommonView::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 6) qt_static_metacall(this, _c, _id, _a); _id -= 6; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< GraphWidget::Orientation*>(_v) = orientation(); break; case 1: *reinterpret_cast< GraphWidget::Mode*>(_v) = mode(); break; case 2: *reinterpret_cast< int*>(_v) = timeLinesCount(); break; case 3: *reinterpret_cast< int*>(_v) = valueLinesCount(); break; case 4: *reinterpret_cast< QColor*>(_v) = cursorColor(); break; case 5: *reinterpret_cast< QColor*>(_v) = linesColor(); break; case 6: *reinterpret_cast< QColor*>(_v) = textColor(); break; case 7: *reinterpret_cast< QColor*>(_v) = backColor(); break; case 8: *reinterpret_cast< QColor*>(_v) = selectionColor(); break; case 9: *reinterpret_cast< Plots*>(_v) = plots(); break; } _id -= 10; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setOrientation(*reinterpret_cast< GraphWidget::Orientation*>(_v)); break; case 1: setMode(*reinterpret_cast< GraphWidget::Mode*>(_v)); break; case 2: setTimeLinesCount(*reinterpret_cast< int*>(_v)); break; case 3: setValueLinesCount(*reinterpret_cast< int*>(_v)); break; case 4: setCursorColor(*reinterpret_cast< QColor*>(_v)); break; case 5: setLinesColor(*reinterpret_cast< QColor*>(_v)); break; case 6: setTextColor(*reinterpret_cast< QColor*>(_v)); break; case 7: setBackColor(*reinterpret_cast< QColor*>(_v)); break; case 8: setSelectionColor(*reinterpret_cast< QColor*>(_v)); break; case 9: setPlots(*reinterpret_cast< Plots*>(_v)); break; } _id -= 10; } else if (_c == QMetaObject::ResetProperty) { _id -= 10; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 10; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 10; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 10; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 10; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 10; } #endif // QT_NO_PROPERTIES return _id; }
void Screen::setBackColor(int space, int color) { currentBackground = CharacterColor(space, color); if ( currentBackground.isValid() ) updateEffectiveRendition(); else setBackColor(COLOR_SPACE_DEFAULT,DEFAULT_BACK_COLOR); }
PanlImg::PanlImg(LPCRECT prc) : HCtrl(prc) { setBackColor( RGB(255, 255, 255) ); setBtnImage( IDB_BTN69X57, CSize( 69, 57 ) ); // 每个扫描窗口下角的按钮图片 m_nRowNumber = 8; m_nColumnNumber = 4; }
void Screen::setBackColor(int space, int color) { cu_bg = CharacterColor(space, color); if ( cu_bg.isValid() ) effectiveRendition(); else setBackColor(COLOR_SPACE_DEFAULT,DEFAULT_BACK_COLOR); }
TouchScreenArea::TouchScreenArea(char *text){ _controller = &TSC; setPadding(5); setText(text); setForeColor(0xffff); setBackColor(0x0000); setFontSize(2); setPosition(0,0); _w = 0; _h = 0; }
TouchScreenArea::TouchScreenArea(char *text, unsigned int foreColor, unsigned int backColor, unsigned int x, unsigned int y, unsigned int w, unsigned int h, unsigned int fontSize, unsigned int padding){ _controller = &TSC; setPadding(padding); setText(text); setForeColor(foreColor); setBackColor(backColor); setFontSize(fontSize); setPosition(x,y); _w = w; _h = h; }
QSLPlotArea::QSLPlotArea(const QList<QSLPlotable *> &plts, QWidget *parent) : QWidget(parent) , mXlowerBound(20) , mXupperBound(20) , mYlowerBound(20) , mYupperBound(20) { setBackColor(Qt::white); setAutoFillBackground(true); setMinimumSize(600,400); QObject::connect(this, SIGNAL(appearenceChanged()), this, SLOT(repaint())); QObject::connect(this, SIGNAL(plotsChanged()), this, SLOT(replot())); setPlotables(plts); }
Button::Button() : isDoingKeyAction(false),mouseIsDown(false),mouseIsInside(false), isButtonToggleButton(false),toggled(false), buttonState(DEFAULT), mouseLeaveState(HOVERED), autoUntoggle(true) { setFocusable(true); setTabable(true); setTextAlignment(ALIGN_MIDDLE_CENTER); setBackColor(Color(115,183,226)); setMargins(1,1,2,2); }
RadioButton::RadioButton() : sidePadding(6), radioButtonState(DEFAULT), mouseIsInside(false), mouseIsDown(false), isDoingKeyAction(false) { setMargins(1,1,1,1); setBackColor(Color(240,240,240)); setFocusable(true); setTabable(true); setRadioButtonAlignment(ALIGN_TOP_LEFT); setTextAlignment(ALIGN_MIDDLE_LEFT); positionRadioButton(); resizeCaption(); setChecked(false); setAutosizing(false); setRadioButtonRadius(6); }
KX_WorldInfo::KX_WorldInfo(Scene *blenderscene, World *blenderworld) { if (blenderworld) { m_name = blenderworld->id.name + 2; m_do_color_management = BKE_scene_check_color_management_enabled(blenderscene); m_hasworld = true; m_hasmist = ((blenderworld->mode) & WO_MIST ? true : false); m_misttype = blenderworld->mistype; m_miststart = blenderworld->miststa; m_mistdistance = blenderworld->mistdist; m_mistintensity = blenderworld->misi; setMistColor(blenderworld->horr, blenderworld->horg, blenderworld->horb); setBackColor(blenderworld->horr, blenderworld->horg, blenderworld->horb); setAmbientColor(blenderworld->ambr, blenderworld->ambg, blenderworld->ambb); } else { m_hasworld = false; } }
ShaderExplodeVolumesAlpha::ShaderExplodeVolumesAlpha(bool withColorPerFace): m_wcpf(withColorPerFace) { m_nameVS = "ShaderExplodeVolumes_vs"; m_nameFS = "ShaderExplodeVolumes_fs"; m_nameGS = "ShaderExplodeVolumes_gs"; std::string glxvert(*GLSLShader::DEFINES_GL); glxvert.append(vertexShaderText); std::string glxgeom; glxgeom.append(GLSLShader::defines_Geom("lines_witw_adjacency", "triangle_strip", 3)); if (withColorPerFace) glxgeom.append("#define WITH_COLORPF 1\n"); glxgeom.append(geometryShaderText); std::string glxfrag(*GLSLShader::DEFINES_GL); glxfrag.append(fragmentShaderText); loadShadersFromMemory(glxvert.c_str(), glxfrag.c_str(), glxgeom.c_str(), GL_LINES_ADJACENCY_EXT , GL_TRIANGLE_STRIP,4); getLocations(); //Default values m_ambient = Geom::Vec4f(0.05f, 0.05f, 0.1f, 0.0f); m_backColor = Geom::Vec4f(1.0f, 0.1f, 0.1f, 0.0f); m_light_pos = Geom::Vec3f(10.0f, 10.0f, 1000.0f); m_plane = Geom::Vec4f(0.0f, 0.0f, 1000.f, 1000000000000000000000000000.0f); m_depthPeeling = 0; setAmbient(m_ambient); setBackColor(m_backColor); setLightPosition(m_light_pos); setClippingPlane(m_plane); setDepthPeeling(m_depthPeeling); }
void UTFT::InitLCD(byte orientation) { orient=orientation; _hw_special_init(); sbi(P_RST, B_RST); delay(5); cbi(P_RST, B_RST); delay(15); sbi(P_RST, B_RST); delay(15); cbi(P_CS, B_CS); switch(display_model) { #ifndef DISABLE_HX8347A #include "tft_drivers/hx8347a/initlcd.h" #endif #ifndef DISABLE_ILI9327 #include "tft_drivers/ili9327/initlcd.h" #endif #ifndef DISABLE_SSD1289 #include "tft_drivers/ssd1289/initlcd.h" #endif #ifndef DISABLE_ILI9325C #include "tft_drivers/ili9325c/initlcd.h" #endif #ifndef DISABLE_ILI9325D #include "tft_drivers/ili9325d/initlcd.h" #endif #ifndef DISABLE_HX8340B_8 #include "tft_drivers/hx8340b/8/initlcd.h" #endif #ifndef DISABLE_HX8340B_S #include "tft_drivers/hx8340b/s/initlcd.h" #endif #ifndef DISABLE_ST7735 #include "tft_drivers/st7735/initlcd.h" #endif #ifndef DISABLE_PCF8833 #include "tft_drivers/pcf8833/initlcd.h" #endif #ifndef DISABLE_S1D19122 #include "tft_drivers/s1d19122/initlcd.h" #endif #ifndef DISABLE_HX8352A #include "tft_drivers/hx8352a/initlcd.h" #endif #ifndef DISABLE_SSD1963_480 #include "tft_drivers/ssd1963/480/initlcd.h" #endif #ifndef DISABLE_SSD1963_800 #include "tft_drivers/ssd1963/800/initlcd.h" #endif #ifndef DISABLE_S6D1121 #include "tft_drivers/s6d1121/initlcd.h" #endif #ifndef DISABLE_ILI9320 #include "tft_drivers/ili9320/initlcd.h" #endif } sbi (P_CS, B_CS); setColor(255, 255, 255); setBackColor(0, 0, 0); cfont.font=0; }
ScrollPane::ScrollPane( HScrollBar *hScroll /*= NULL*/, VScrollBar* vScroll /*= NULL*/, Widget* scrollBarInset /*= NULL*/, Widget* contentContainer /*= NULL*/ ) { pChildHScroll = NULL; pChildVScroll = NULL; pChildInset = NULL; pChildContent = NULL; if(contentContainer) { isMaintainingContent = false; pChildContent = contentContainer; } else { isMaintainingContent = true; pChildContent = new EmptyWidget(); } if(hScroll) { isMaintainingHScroll = false; pChildHScroll = hScroll; } else { isMaintainingHScroll = true; pChildHScroll = new HScrollBar(); } if(vScroll) { isMaintainingVScroll = false; pChildVScroll = vScroll; } else { isMaintainingVScroll = true; pChildVScroll = new VScrollBar(); } if(scrollBarInset) { isMaintainingInset = false; pChildInset = scrollBarInset; } else { isMaintainingInset = true; pChildInset = new EmptyWidget(); } addPrivateChild(pChildContent); addPrivateChild(pChildInset); pChildContent->addWidgetListener(this); addPrivateChild(pChildHScroll); addPrivateChild(pChildVScroll); pChildContent->addMouseListener(this); pChildHScroll->addHScrollBarListener(this); pChildVScroll->addVScrollBarListener(this); setHScrollPolicy(SHOW_AUTO); setVScrollPolicy(SHOW_AUTO); setBackColor(Color(150,150,150)); pChildInset->setBackColor(Color(120,120,120)); setWheelScrollRate(2); setHKeyScrollRate(6); setVKeyScrollRate(6); }
void UTFT::InitLCD(byte orientation) { orient=orientation; _hw_special_init(); sbi(P_RST, B_RST); delay(5); cbi(P_RST, B_RST); delay(15); sbi(P_RST, B_RST); delay(15); cbi(P_CS, B_CS); switch(display_model) { #ifndef DISABLE_HX8347A #include "tft_drivers/hx8347a/initlcd.h" #endif #ifndef DISABLE_ILI9327 #include "tft_drivers/ili9327/initlcd.h" #endif #ifndef DISABLE_SSD1289 #include "tft_drivers/ssd1289/initlcd.h" #endif #ifndef DISABLE_ILI9325C #include "tft_drivers/ili9325c/initlcd.h" #endif #ifndef DISABLE_ILI9325D #include "tft_drivers/ili9325d/default/initlcd.h" #endif #ifndef DISABLE_ILI9325D_ALT #include "tft_drivers/ili9325d/alt/initlcd.h" #endif #ifndef DISABLE_HX8340B_8 #include "tft_drivers/hx8340b/8/initlcd.h" #endif #ifndef DISABLE_HX8340B_S #include "tft_drivers/hx8340b/s/initlcd.h" #endif #ifndef DISABLE_ST7735 #include "tft_drivers/st7735/initlcd.h" #endif #ifndef DISABLE_PCF8833 #include "tft_drivers/pcf8833/initlcd.h" #endif #ifndef DISABLE_S1D19122 #include "tft_drivers/s1d19122/initlcd.h" #endif #ifndef DISABLE_HX8352A #include "tft_drivers/hx8352a/initlcd.h" #endif #ifndef DISABLE_SSD1963_480 #include "tft_drivers/ssd1963/480/initlcd.h" #endif #ifndef DISABLE_SSD1963_800 #include "tft_drivers/ssd1963/800/initlcd.h" #endif #ifndef DISABLE_SSD1963_800_ALT #include "tft_drivers/ssd1963/800alt/initlcd.h" #endif #ifndef DISABLE_S6D1121 #include "tft_drivers/s6d1121/initlcd.h" #endif #ifndef DISABLE_ILI9320 #include "tft_drivers/ili9320/initlcd.h" #endif #ifndef DISABLE_ILI9481 #include "tft_drivers/ili9481/initlcd.h" #endif #ifndef DISABLE_S6D0164 #include "tft_drivers/s6d0164/initlcd.h" #endif #ifndef DISABLE_ST7735S #include "tft_drivers/st7735s/initlcd.h" #endif #ifndef DISABLE_ILI9341_S4P #include "tft_drivers/ili9341/s4p/initlcd.h" #endif #ifndef DISABLE_ILI9341_S5P #include "tft_drivers/ili9341/s5p/initlcd.h" #endif #ifndef DISABLE_R61581 #include "tft_drivers/r61581/initlcd.h" #endif #ifndef DISABLE_ILI9486 #include "tft_drivers/ili9486/initlcd.h" //----------------------------------------------------------- #endif #ifndef DISABLE_SPFD5408A #include "tft_drivers/spfd5408a/initlcd.h" #endif #ifndef DISABLE_SPFD5408C #include "tft_drivers/spfd5408c/initlcd.h" #endif #ifndef DISABLE_SPFD5408B #include "tft_drivers/spfd5408b/initlcd.h" #endif } //--------------------------------------------------------------- sbi (P_CS, B_CS); setColor(255, 255, 255); setBackColor(0, 0, 0); cfont.font=0; _transparent = false; }
//class SButton SButton::SButton() { ftUI::Button(); setForeColor(FT_White); setBackColor(FT_Black); }
int MessageListScript::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = MessageList::qt_metacall(_c, _id, _a); if (_id < 0) return _id; #ifndef QT_NO_PROPERTIES if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< QColor*>(_v) = criColor(); break; case 1: *reinterpret_cast< QColor*>(_v) = attColor(); break; case 2: *reinterpret_cast< QColor*>(_v) = normColor(); break; case 3: *reinterpret_cast< QColor*>(_v) = backColor(); break; case 4: *reinterpret_cast< vtlmeta::types::NamedList*>(_v) = getList(); break; case 5: *reinterpret_cast< QString*>(_v) = sourcerName(); break; case 6: *reinterpret_cast< QString*>(_v) = toolTip(); break; case 7: *reinterpret_cast< VISIBLE*>(_v) = getVisible(); break; case 8: *reinterpret_cast< bool*>(_v) = useMask(); break; case 9: *reinterpret_cast< QString*>(_v) = globalListName(); break; case 10: *reinterpret_cast< QFont*>(_v) = font(); break; case 11: *reinterpret_cast< QRect*>(_v) = geometry(); break; case 12: *reinterpret_cast< Shape*>(_v) = frameShape(); break; case 13: *reinterpret_cast< Shadow*>(_v) = frameShadow(); break; case 14: *reinterpret_cast< int*>(_v) = lineWidth(); break; case 15: *reinterpret_cast< int*>(_v) = midLineWidth(); break; case 16: *reinterpret_cast< int*>(_v) = margin(); break; case 17: *reinterpret_cast< vtlmeta::types::NamedList*>(_v) = getFuncList(); break; } _id -= 18; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setCriColor(*reinterpret_cast< QColor*>(_v)); break; case 1: setAttColor(*reinterpret_cast< QColor*>(_v)); break; case 2: setNormColor(*reinterpret_cast< QColor*>(_v)); break; case 3: setBackColor(*reinterpret_cast< QColor*>(_v)); break; case 4: setList(*reinterpret_cast< vtlmeta::types::NamedList*>(_v)); break; case 5: setSourcerName(*reinterpret_cast< QString*>(_v)); break; case 6: setToolTip(*reinterpret_cast< QString*>(_v)); break; case 7: setVisible(*reinterpret_cast< VISIBLE*>(_v)); break; case 8: setUseMask(*reinterpret_cast< bool*>(_v)); break; case 9: setGlobalListName(*reinterpret_cast< QString*>(_v)); break; case 10: setFont(*reinterpret_cast< QFont*>(_v)); break; case 11: setGeometry(*reinterpret_cast< QRect*>(_v)); break; case 12: setFrameShape(*reinterpret_cast< Shape*>(_v)); break; case 13: setFrameShadow(*reinterpret_cast< Shadow*>(_v)); break; case 14: setLineWidth(*reinterpret_cast< int*>(_v)); break; case 15: setMidLineWidth(*reinterpret_cast< int*>(_v)); break; case 16: setMargin(*reinterpret_cast< int*>(_v)); break; case 17: setFuncList(*reinterpret_cast< vtlmeta::types::NamedList*>(_v)); break; } _id -= 18; } else if (_c == QMetaObject::ResetProperty) { _id -= 18; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 18; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 18; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 18; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 18; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 18; } #endif // QT_NO_PROPERTIES return _id; }
void ITDB02::InitLCD(byte orientation) { orient=orientation; *P_RST |= B_RST; delay(5); *P_RST &= ~B_RST; delay(5); *P_RST |= B_RST; delay(5); *P_CS &= ~B_CS; //************* ILI9325C/D **********// main_W_com_data(0xE5, 0x78F0); // set SRAM internal timing main_W_com_data(0x01, 0x0100); // set SS and SM bit main_W_com_data(0x02, ITDB02InitValues[0][displaymodel]); // set 1 line inversion main_W_com_data(0x03, 0x1030); // set GRAM write direction and BGR=1. main_W_com_data(0x04, 0x0000); // Resize register main_W_com_data(0x08, 0x0207); // set the back porch and front porch main_W_com_data(0x09, 0x0000); // set non-display area refresh cycle ISC[3:0] main_W_com_data(0x0A, 0x0000); // FMARK function main_W_com_data(0x0C, 0x0000); // RGB interface setting main_W_com_data(0x0D, 0x0000); // Frame marker Position main_W_com_data(0x0F, 0x0000); // RGB interface polarity //*************Power On sequence ****************// main_W_com_data(0x10, 0x0000); // SAP, BT[3:0], AP, DSTB, SLP, STB main_W_com_data(0x11, 0x0007); // DC1[2:0], DC0[2:0], VC[2:0] main_W_com_data(0x12, 0x0000); // VREG1OUT voltage main_W_com_data(0x13, 0x0000); // VDV[4:0] for VCOM amplitude main_W_com_data(0x07, 0x0001); delay(50); // Dis-charge capacitor power voltage main_W_com_data(0x10, ITDB02InitValues[1][displaymodel]); // SAP, BT[3:0], AP, DSTB, SLP, STB main_W_com_data(0x11, 0x0227); // Set DC1[2:0], DC0[2:0], VC[2:0] delay(50); // Delay 50ms main_W_com_data(0x12, ITDB02InitValues[2][displaymodel]); // 0012 delay(50); // Delay 50ms main_W_com_data(0x13, ITDB02InitValues[3][displaymodel]); // VDV[4:0] for VCOM amplitude main_W_com_data(0x29, ITDB02InitValues[4][displaymodel]); // 04 VCM[5:0] for VCOMH main_W_com_data(0x2B, 0x000D); // Set Frame Rate delay(50); // Delay 50ms main_W_com_data(0x20, 0x0000); // GRAM horizontal Address main_W_com_data(0x21, 0x0000); // GRAM Vertical Address // ----------- Adjust the Gamma Curve ----------// main_W_com_data(0x30, gamma[0][displaymodel]); main_W_com_data(0x31, gamma[1][displaymodel]); main_W_com_data(0x32, gamma[2][displaymodel]); main_W_com_data(0x35, gamma[3][displaymodel]); main_W_com_data(0x36, gamma[4][displaymodel]); main_W_com_data(0x37, gamma[5][displaymodel]); main_W_com_data(0x38, gamma[6][displaymodel]); main_W_com_data(0x39, gamma[7][displaymodel]); main_W_com_data(0x3C, gamma[8][displaymodel]); main_W_com_data(0x3D, gamma[9][displaymodel]); //------------------ Set GRAM area ---------------// main_W_com_data(0x50, 0x0000); // Horizontal GRAM Start Address main_W_com_data(0x51, 0x00EF); // Horizontal GRAM End Address main_W_com_data(0x52, 0x0000); // Vertical GRAM Start Address main_W_com_data(0x53, 0x013F); // Vertical GRAM Start Address main_W_com_data(0x60, 0xA700); // Gate Scan Line main_W_com_data(0x61, 0x0001); // NDL,VLE, REV main_W_com_data(0x6A, 0x0000); // set scrolling line //-------------- Partial Display Control ---------// main_W_com_data(0x80, 0x0000); main_W_com_data(0x81, 0x0000); main_W_com_data(0x82, 0x0000); main_W_com_data(0x83, 0x0000); main_W_com_data(0x84, 0x0000); main_W_com_data(0x85, 0x0000); //-------------- Panel Control -------------------// main_W_com_data(0x90, 0x0010); main_W_com_data(0x92, ITDB02InitValues[5][displaymodel]); main_W_com_data(0x07, 0x0133); // 262K color and display ON *P_CS |= B_CS; setColor(255, 255, 255); setBackColor(0, 0, 0); cfont.font=0; }
void UTFT::InitLCD(byte orientation) { orient=orientation; _hw_special_init(); pinMode(__p1,OUTPUT); pinMode(__p2,OUTPUT); pinMode(__p3,OUTPUT); if (__p4 != NOTINUSE) pinMode(__p4,OUTPUT); if ((display_transfer_mode==LATCHED_16) or ((display_transfer_mode==1) and (display_serial_mode==SERIAL_5PIN))) pinMode(__p5,OUTPUT); if (display_transfer_mode!=1) _set_direction_registers(display_transfer_mode); sbi(P_RST, B_RST); delay(5); cbi(P_RST, B_RST); delay(15); sbi(P_RST, B_RST); delay(15); cbi(P_CS, B_CS); switch(display_model) { #ifndef DISABLE_HX8347A #include "tft_drivers/hx8347a/initlcd.h" #endif #ifndef DISABLE_ILI9327 #include "tft_drivers/ili9327/initlcd.h" #endif #ifndef DISABLE_SSD1289 #include "tft_drivers/ssd1289/initlcd.h" #endif #ifndef DISABLE_ILI9325C #include "tft_drivers/ili9325c/initlcd.h" #endif #ifndef DISABLE_ILI9325D #include "tft_drivers/ili9325d/default/initlcd.h" #endif #ifndef DISABLE_ILI9325D_ALT #include "tft_drivers/ili9325d/alt/initlcd.h" #endif #ifndef DISABLE_HX8340B_8 #include "tft_drivers/hx8340b/8/initlcd.h" #endif #ifndef DISABLE_HX8340B_S #include "tft_drivers/hx8340b/s/initlcd.h" #endif #ifndef DISABLE_ST7735 #include "tft_drivers/st7735/std/initlcd.h" #endif #ifndef DISABLE_ST7735_ALT #include "tft_drivers/st7735/alt/initlcd.h" #endif #ifndef DISABLE_PCF8833 #include "tft_drivers/pcf8833/initlcd.h" #endif #ifndef DISABLE_S1D19122 #include "tft_drivers/s1d19122/initlcd.h" #endif #ifndef DISABLE_HX8352A #include "tft_drivers/hx8352a/initlcd.h" #endif #ifndef DISABLE_SSD1963_480 #include "tft_drivers/ssd1963/480/initlcd.h" #endif #ifndef DISABLE_SSD1963_800 #include "tft_drivers/ssd1963/800/initlcd.h" #endif #ifndef DISABLE_SSD1963_800_ALT #include "tft_drivers/ssd1963/800alt/initlcd.h" #endif #ifndef DISABLE_S6D1121 #include "tft_drivers/s6d1121/initlcd.h" #endif #ifndef DISABLE_ILI9481 #include "tft_drivers/ili9481/initlcd.h" #endif #ifndef DISABLE_S6D0164 #include "tft_drivers/s6d0164/initlcd.h" #endif #ifndef DISABLE_ST7735S #include "tft_drivers/st7735s/initlcd.h" #endif #ifndef DISABLE_ILI9341_S4P #include "tft_drivers/ili9341/s4p/initlcd.h" #endif #ifndef DISABLE_ILI9341_S5P #include "tft_drivers/ili9341/s5p/initlcd.h" #endif #ifndef DISABLE_R61581 #include "tft_drivers/r61581/initlcd.h" #endif #ifndef DISABLE_ILI9486 #include "tft_drivers/ili9486/initlcd.h" #endif #ifndef DISABLE_CPLD #include "tft_drivers/cpld/initlcd.h" #endif #ifndef DISABLE_HX8353C #include "tft_drivers/hx8353c/initlcd.h" #endif } sbi (P_CS, B_CS); setColor(255, 255, 255); setBackColor(0, 0, 0); cfont.font=0; _transparent = false; }