这篇教程C++ write_cmd函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中write_cmd函数的典型用法代码示例。如果您正苦于以下问题:C++ write_cmd函数的具体用法?C++ write_cmd怎么用?C++ write_cmd使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了write_cmd函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: set_orientationvoid set_orientation(orientation o){ display.orient = o; write_cmd(MEMORY_ACCESS_CONTROL); if (o==North) { display.width = LCDWIDTH; display.height = LCDHEIGHT; write_data(0x48); } else if (o==West) { display.width = LCDHEIGHT; display.height = LCDWIDTH; write_data(0xE8); } else if (o==South) { display.width = LCDWIDTH; display.height = LCDHEIGHT; write_data(0x88); } else if (o==East) { display.width = LCDHEIGHT; display.height = LCDWIDTH; write_data(0x28); } write_cmd(COLUMN_ADDRESS_SET); write_data16(0); write_data16(display.width-1); write_cmd(PAGE_ADDRESS_SET); write_data16(0); write_data16(display.height-1);}
开发者ID:jake314159,项目名称:avr-snake,代码行数:31,
示例2: set_xy/************************************************************ 函数名称:* 功能描述: OLED设置坐标* 参数列表:* 返回结果:* 备 注:***********************************************************/void OLED_SSD1306::set_xy(uint16_t x, uint16_t y){ write_cmd(0xb0 + y); write_cmd(((x & 0xf0) >> 4) | 0x10); write_cmd((x & 0x0f) | 0x01);}
开发者ID:0x1abin,项目名称:ebox_stm32,代码行数:14,
示例3: ili9341fb_set_addr_winvoid ili9341fb_set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye){ uint8_t xsl, xsh, xel, xeh, ysl, ysh, yel, yeh; u16 *p = (u16 *)par->buf; int i = 0; fbtft_dev_dbg(DEBUG_SET_ADDR_WIN, par->info->device, "%s(xs=%d, ys=%d, xe=%d, ye=%d)/n", __func__, xs, ys, xe, ye); xsl = (uint8_t)(xs & 0xff); xsh = (uint8_t)((xs >> 8) & 0xff); xel = (uint8_t)(xe & 0xff); xeh = (uint8_t)((xe >> 8) & 0xff); ysl = (uint8_t)(ys & 0xff); ysh = (uint8_t)((ys >> 8) & 0xff); yel = (uint8_t)(ye & 0xff); yeh = (uint8_t)((ye >> 8) & 0xff); write_cmd(par, FBTFT_CASET); write_data(par, xsh); write_data(par, xsl); write_data(par, xeh); write_data(par, xel); write_cmd(par, FBTFT_RASET); write_data(par, ysh); write_data(par, ysl); write_data(par, yeh); write_data(par, yel); write_cmd(par, FBTFT_RAMWR); write_flush(par);}
开发者ID:cnvogelg,项目名称:fbtft,代码行数:34,
示例4: conax_do_emmstatic int32_t conax_do_emm(struct s_reader * reader, EMM_PACKET *ep){ def_resp; unsigned char insCA[] = { 0xDD,0xCA,0x00,0x00,0x00 }; unsigned char insEMM[] = { 0xDD,0x84,0x00,0x00,0x00 }; unsigned char buf[255]; int32_t rc=0; const int32_t l = ep->emm[2]; insEMM[4]=l+5; buf[0]=0x12; buf[1]=l+3; memcpy(buf+2, ep->emm, buf[1]); write_cmd(insEMM, buf); if (cta_res[0] == 0x98) { insCA[4] = cta_res[1]; write_cmd(insCA, NULL); } rc=((cta_res[0]==0x90)&&(cta_res[1]==0x00)); if (rc) return OK; else return ERROR;}
开发者ID:knasson,项目名称:oscam-emu,代码行数:28,
示例5: display_charvoid display_char(char c){ uint16_t x, y; PGM_P fdata; uint8_t bits, mask; uint16_t sc=display.x, ec=display.x + 4, sp=display.y, ep=display.y + 7; if (c < 32 || c > 126) return; fdata = (c - ' ')*5 + font5x7; write_cmd(PAGE_ADDRESS_SET); write_data16(sp); write_data16(ep); for(x=sc; x<=ec; x++) { write_cmd(COLUMN_ADDRESS_SET); write_data16(x); write_data16(x); write_cmd(MEMORY_WRITE); bits = pgm_read_byte(fdata++); for(y=sp, mask=0x01; y<=ep; y++, mask<<=1) write_data16((bits & mask) ? display.foreground : display.background); } write_cmd(COLUMN_ADDRESS_SET); write_data16(x); write_data16(x); write_cmd(MEMORY_WRITE); for(y=sp; y<=ep; y++) write_data16(display.background); display.x += 6; if (display.x >= display.width) { display.x=0; display.y+=8; }}
开发者ID:arian009,项目名称:GroupG,代码行数:30,
示例6: gdisp_lld_flush LLDSPEC void gdisp_lld_flush(GDisplay *g) { uint8_t * ram; unsigned pages; // Don't flush if we don't need it. if (!(g->flags & GDISP_FLG_NEEDFLUSH)) return; ram = RAM(g); pages = GDISP_SCREEN_HEIGHT/8; acquire_bus(g); write_cmd(g, SSD1306_SETSTARTLINE | 0); while (pages--) { #if SSD1306_SH1106 write_cmd(g, SSD1306_PAM_PAGE_START + (7 - pages)); write_cmd(g, SSD1306_SETLOWCOLUMN + 2); write_cmd(g, SSD1306_SETHIGHCOLUMN); #endif write_data(g, ram, SSD1306_PAGE_WIDTH); ram += SSD1306_PAGE_WIDTH; } release_bus(g); g->flags &= ~GDISP_FLG_NEEDFLUSH; }
开发者ID:yusp75,项目名称:pellet-stove-control,代码行数:27,
示例7: tdisp_lld_controlvoid tdisp_lld_control(uint16_t what, void *value) { switch(what) { case TDISP_CTRL_BACKLIGHT: if ((uint8_t)value) displaycontrol |= DISPLAY_ON; else displaycontrol &= ~DISPLAY_ON; write_cmd(0x08 | displaycontrol); break; case TDISP_CTRL_CURSOR: switch((cursorshape)value) { case cursorOff: displaycontrol &= ~CURSOR_ON; break; case cursorBlock: case cursorUnderline: case cursorBar: displaycontrol = (displaycontrol | CURSOR_ON) & ~CURSOR_BLINK; break; case cursorBlinkingBlock: case cursorBlinkingUnderline: case cursorBlinkingBar: default: displaycontrol |= (CURSOR_ON | CURSOR_BLINK); break; } write_cmd(0x08 | displaycontrol); break; }}
开发者ID:niamster,项目名称:ChibiOS-GFX,代码行数:30,
示例8: OLED_Display_Off//关闭OLED显示void OLED_Display_Off(void){ write_cmd(0X8D); //SET DCDC命令 write_cmd(0X10); //DCDC OFF write_cmd(0XAE); //DISPLAY OFF Set_OLED_VDD; Set_OLED_VBAT;}
开发者ID:nachiram,项目名称:audio-analyzer_zedboard,代码行数:9,
示例9: goxyvoid goxy(unsigned char y,unsigned char x){ if(y==1) write_cmd(0x80|x); if(y==2) write_cmd(x-(0x40));}
开发者ID:super-1943,项目名称:MCU,代码行数:8,
示例10: blankstatic int blank(struct fbtft_par *par, bool on){ fbtft_dev_dbg(DEBUG_BLANK, par->info->device, "%s(blank=%s)/n", __func__, on ? "true" : "false"); if (on) write_cmd(par, 0xAE); else write_cmd(par, 0xAF); return 0;}
开发者ID:cnvogelg,项目名称:fbtft,代码行数:9,
示例11: lcd_l602initvoid lcd_l602init()//1602初始化{ EN=0; write_cmd(0x38);//设置16*2显示 write_cmd(0x0c);//显示器开,光标开 write_cmd(0x06);//写一个字符后地址加1 write_cmd(0x01);//显示清0,DPTR清0}
开发者ID:xiaobai1993,项目名称:Voice-calculator,代码行数:9,
示例12: tdisp_lld_control/* Write display control commands to the display */void tdisp_lld_control(uint16_t what, uint16_t value) { switch(what) { case TDISP_CTRL_DISPLAY: switch (value) { case displayOff: displaycontrol &= ~TDISP_DISPLAY_ON; break; case displayOn: displaycontrol |= TDISP_DISPLAY_ON; break; } write_cmd(0x08 | displaycontrol); break; case TDISP_CTRL_CURSOR: switch (value) { case cursorBlinkingBlock: case cursorBlinkingUnderline: case cursorBlinkingBar: displaycontrol |= TDISP_CURSOR_ON + TDISP_CURSOR_BLINK; break; case cursorBlock: case cursorUnderline: case cursorBar: displaycontrol = (displaycontrol | TDISP_CURSOR_ON) & ~TDISP_CURSOR_BLINK; break; case cursorOff: default: displaycontrol &= ~(TDISP_CURSOR_ON | TDISP_CURSOR_BLINK); // zet alleen de cursor uit. Bewaar de overige instellingen break; } write_cmd(0x08 | displaycontrol); break; case TDISP_CTRL_MOVE: switch (value) { case cursorIncrease: cursorcontrol |= TDISP_CURSOR_INC; // increase cursor position break; case cursorDecrease: cursorcontrol &= ~TDISP_CURSOR_INC; // decrease cursor position break; } write_cmd(0x04 | cursorcontrol); break; case TDISP_CTRL_SHIFT: switch (value) { case shiftOn: cursorcontrol |= TDISP_SHIFT_ON; break; case shiftOff: cursorcontrol &= ~TDISP_SHIFT_ON; break; } write_cmd(0x04 | cursorcontrol); break; }}
开发者ID:abhishek-kakkar,项目名称:ChibiOS-GFX,代码行数:57,
示例13: write_cmd/*-----------------------------------------------------------------------LCD_clear : LCD清屏函数-----------------------------------------------------------------------*/void NOKIA5110::clear(void) { unsigned int i = 0; write_cmd(0x0c); write_cmd(0x80); for (i=0; i<504; i++) write_data(0); }
开发者ID:Xcping2013,项目名称:ebox_stm32,代码行数:13,
示例14: lcd_init/*LCD?????*/void lcd_init(){ LCD_PSB=1; write_cmd(0x30); delay_1ms(5); write_cmd(0x0C); delay_1ms(5); write_cmd(0x01); delay_1ms(5);}
开发者ID:linqinghuang,项目名称:sourcecode,代码行数:11,
示例15: gdisp_lld_write_start LLDSPEC void gdisp_lld_write_start(GDisplay *g) { acquire_bus(g); write_cmd(g, SSD1327_SET_COLUMN_ADDRESS); write_data(g, g->p.x); write_data(g, g->p.x + g->p.cx - 1); write_cmd(g, SSD1327_SET_ROW_ADDRESS); write_data(g, g->p.y); write_data(g, g->p.y + g->p.cy - 1); write_cmd(g, SSD1327_WRITE_RAM); }
开发者ID:cosmikwolf,项目名称:ArduinoLibraries,代码行数:10,
示例16: nokia_lcd_rendervoid nokia_lcd_render(void){ register unsigned i; /* Set column and row to 0 */ write_cmd(0x80); write_cmd(0x40); /* Write screen to display */ for (i = 0; i < 504; i++) write_data(nokia_lcd.screen[i]);}
开发者ID:rodrie2,项目名称:UNLVCPE301,代码行数:11,
|