本文整理汇总了C++中wr_cmd函数的典型用法代码示例。如果您正苦于以下问题:C++ wr_cmd函数的具体用法?C++ wr_cmd怎么用?C++ wr_cmd使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wr_cmd函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: erase_single_block
unsigned int erase_single_block(int dev, unsigned int addr)
{
wr_cmd(dev, addr, XFL_CMD_BLOCK_ERASE_SETUP);
wr_cmd(dev, addr, XFL_CMD_CONFIRM);
return flash_wt_rdy(dev, addr);
}
示例2: S6B33BG_ColorMode
void S6B33BG_ColorMode(COLOR_MODE color_mode) {
wr_cmd(S6B33BG_ADDRESSING_MODE);
wr_cmd(0x1B|color_mode);
S6B33BG_color_mode=color_mode;
}
示例3: switch
void S65L2F50::setArea(int_least16_t x0, int_least16_t y0, int_least16_t x1, int_least16_t y1)
{
switch(lcd_orientation)
{
default:
case 0:
wr_cmd(0x15); //column address set
wr_dat(0x08+y0); //start column
wr_dat(0x01); //start column
wr_dat(0x08+y1); //end column
wr_dat(0x01); //end column
wr_cmd(0x75); //page address set
wr_dat(x0); //start page
wr_dat(x1); //end page
break;
//case 90:
//not implemented
// break;
case 180:
wr_cmd(0x15); //column address set
wr_dat(0x08+(LCD_HEIGHT-1)-y1); //start column
wr_dat(0x01); //start column
wr_dat(0x08+(LCD_HEIGHT-1)-y0); //end column
wr_dat(0x01); //end column
wr_cmd(0x75); //page address set
wr_dat(x0); //start page
wr_dat(x1); //end page
break;
//case 270:
//not implemented
// break;
}
return;
}
示例4: ili9341_set_window
static void ili9341_set_window (unsigned short col_l, //
unsigned short col_h, // col_l <= col_h < 320 --> x
unsigned short row_l, // row_l <= row_h < 240 --> y
unsigned short row_h) {
/*
0 ----------> X (max 319)
|
|
|
|
Y (max 239)
*/
wr_cmd(0x2A); // Collum area set (collum max = 320)
wr_dat((col_l>>8)& 0xFF); // Colum high byte (lower collum)
wr_dat(col_l & 0xFF); // Colum low byte (lower collum)
wr_dat((col_h>>8)& 0xFF); // Colum high byte (upper collum)
wr_dat(col_h & 0xFF); // Colum low byte (upper collum)
wr_cmd(0x2B); // Row area set (row max = 240)
wr_dat((row_l>>8)& 0xFF); // Row high byte (lower row)
wr_dat(row_l & 0xFF); // Row low byte (lower row)
wr_dat((row_h>>8)& 0xFF); // Row high byte (upper row)
wr_dat(row_h & 0xFF); // Row low byte (upper row)
wr_cmd(0x2c);
}
示例5: display_set_orientation
void display_set_orientation(u08 o)
{
switch(o)
{
case DISPLAY_ORIENTATION_0:
display_orientation = DISPLAY_ORIENTATION_0;
display_width = 320;
display_height = 240;
wr_cmd(0x16, 0x00A8); //MY=1 MX=0 MV=1 ML=0 BGR=1
break;
case DISPLAY_ORIENTATION_90:
display_orientation = DISPLAY_ORIENTATION_90;
display_width = 240;
display_height = 320;
wr_cmd(0x16, 0x0008); //MY=0 MX=0 MV=0 ML=0 BGR=1
break;
case DISPLAY_ORIENTATION_180:
display_orientation = DISPLAY_ORIENTATION_180;
display_width = 320;
display_height = 240;
wr_cmd(0x16, 0x0068); //MY=0 MX=1 MV=1 ML=0 BGR=1
break;
case DISPLAY_ORIENTATION_270:
display_orientation = DISPLAY_ORIENTATION_270;
display_width = 240;
display_height = 320;
wr_cmd(0x16, 0x00C8); //MY=1 MX=0 MV=1 ML=0 BGR=1
break;
}
display_set_area(0, 0, display_width-1, display_height-1);
}
示例6: lock_single_block
void lock_single_block(int dev, unsigned int addr)
{
char status;
do
{
wr_cmd(dev, addr, XFL_CMD_BLOCK_LOCK_SETUP);
wr_cmd(dev, addr, XFL_CMD_BLOCK_LOCK_CONFIRM);
status = rd_cmd(dev, addr + 2, XFL_CMD_READ_ELEC_SIG);
}
while (status == 0);
}
示例7: wr_cmd
void MI0283QT9::setArea(int_least16_t x0, int_least16_t y0, int_least16_t x1, int_least16_t y1)
{
wr_cmd(LCD_CMD_COLUMN);
wr_data16(x0);
wr_data16(x1);
wr_cmd(LCD_CMD_PAGE);
wr_data16(y0);
wr_data16(y1);
return;
}
示例8: display_enable
void display_enable(u08 on)
{
if(on) {
wr_cmd(0x28, 0x0038);
_delay_ms(40);
wr_cmd(0x28, 0x003C);
} else {
wr_cmd(0x28, 0x0038);
_delay_ms(40);
wr_cmd(0x28, 0x0004);
}
}
示例9: if
void S65LS020::setOrientation(uint_least16_t o)
{
uint_least8_t p1, p5;
if((o == 9) ||
(o == 90))
{
lcd_orientation = 90;
lcd_width = LCD_HEIGHT;
lcd_height = LCD_WIDTH;
p1 = 0x00; //x0->x1, y0->y1
p5 = 0x00; //0x04=rotate, 0x00=normal
}
else if((o == 18) ||
(o == 180))
{
lcd_orientation = 180;
lcd_width = LCD_WIDTH;
lcd_height = LCD_HEIGHT;
p1 = 0x80; //x0->x1, y1->y0
p5 = 0x04; //0x04=rotate, 0x00=normal
}
else if((o == 27) ||
(o == 14) ||
(o == 270))
{
lcd_orientation = 270;
lcd_width = LCD_HEIGHT;
lcd_height = LCD_WIDTH;
p1 = 0xC0; //x1->x0, y1->y0
p5 = 0x00; //0x04=rotate, 0x00=normal
}
else
{
lcd_orientation = 0;
lcd_width = LCD_WIDTH;
lcd_height = LCD_HEIGHT;
p1 = 0x40; //x1->x0, y0->y1
p5 = 0x04; //0x04=rotate, 0x00=normal
}
wr_cmd(0xEF, 0x90);
wr_cmd(0x01, p1);
wr_cmd(0x05, p5);
setArea(0, 0, lcd_width-1, lcd_height-1);
return;
}
示例10: NokiaN70_SetWindow
void NokiaN70_SetWindow(uint16_t x0,uint16_t y0,uint16_t x1,uint16_t y1) {
wr_cmd(COLUMN_ADDRESS_SET);
wr_dat(x0>>8);
wr_dat(x0);
wr_dat(x1>>8);
wr_dat(x1);
wr_cmd(PAGE_ADDRESS_SET);
wr_dat(y0>>8);
wr_dat(y0);
wr_dat(y1>>8);
wr_dat(y1);
}
示例11: wr_data_B
unsigned int wr_data_B(int dev, unsigned int addr, char data)
{
wr_cmd(dev, addr, XFL_CMD_PROGRAM_SETUP);
wr_byte(dev, addr, data);
return flash_wt_rdy(dev, addr);
}
示例12: NokiaN70_PartialArea
void NokiaN70_PartialArea(uint16_t y0,uint16_t y1) {
wr_cmd(PARTIAL_AREA);
wr_dat(y0>>8);
wr_dat(y0);
wr_dat(y1>>8);
wr_dat(y1);
}
示例13: wr_cmd
void SPI_TFT_ILI9341::window (unsigned int x, unsigned int y, unsigned int w, unsigned int h)
{
wr_cmd(0x2A);
SPI::write(x >> 8);
SPI::write(x);
SPI::write((x+w-1) >> 8);
SPI::write(x+w-1);
_cs = 1;
wr_cmd(0x2B);
SPI::write(y >> 8);
SPI::write(y);
SPI::write((y+h-1) >> 8);
SPI::write(y+h-1);
_cs = 1;
}
示例14: wr_reg
static __inline void wr_reg (unsigned char reg, unsigned short val) {
Clr_Cs;
wr_cmd(reg);
wr_dat(val);
Set_Cs;
}
示例15: wr_reg
static inline void wr_reg (unsigned char reg, unsigned short val) {
LCD_CS(0)
wr_cmd(reg);
wr_dat(val);
LCD_CS(1)
}