亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? lcd128x64.c

?? embedded graphics library for avr
?? C
?? 第 1 頁 / 共 2 頁
字號:
** the column is in range.
**
*/

void lcd_vert_line(unsigned char top, unsigned char bottom,
		           unsigned char column)
{
	unsigned char bit_pos;
	unsigned char byte_offset;
	unsigned char y_bits;
	unsigned char remaining_bits;
	unsigned char mask;

	bit_pos = top & 0x07;		   /* get starting bit offset into byte */

	byte_offset = top >> 3;		   /* get byte offset into y direction */
	y_bits = (bottom - top) + 1;   /* get length in the x direction to write */
	remaining_bits = 8 - bit_pos;  /* number of bits left in byte */
	mask = l_mask_array[bit_pos];  /* get mask for this bit */

	while(y_bits)				   /* while there are still bits to write */
	{
		if((remaining_bits == 8) && (y_bits > 7))
		{
			/* here if we are byte aligned and have at least 1 byte to write */
			/* do the entire byte at once instead of bit by bit */
			while(y_bits > 7)			/* while there are at least 8 more bits to do */
			{
				l_display_array[byte_offset][column] = 0xFF;
				byte_offset++;
				y_bits -= 8;
			}
		}
		else
		{
      		/* we are not byte aligned or an entire byte does not need written */
      		/* do each individual bit                                          */
			l_display_array[byte_offset][column] |= mask;
			if(l_mask_array[0] & 0x80)
			{
				mask >>= 1;
			}
			else
			{
				mask <<= 1;
			}
			y_bits--;
			remaining_bits--;
			if(remaining_bits == 0)
			{
				/* might have bust gotton byte aligned */
				/* so reset for beginning of a byte */
				remaining_bits = 8;
				byte_offset++;
				mask = l_mask_array[0];
			}
		}
	}
}

/*
**
** Clears a line into the display memory starting at left going to
** right, on the given row. No runtime error checking is performed.  
** It is assumed that left is less than right.
**
*/

void lcd_clr_horz_line(unsigned char left, unsigned char right,
		               unsigned char row)
{
	unsigned char bit_pos;
	unsigned char byte_offset;
	unsigned char mask;
	unsigned char col;

  	bit_pos = row & 0x07;			/* get the bit offset into a byte */
  	byte_offset = row >> 3;		    /* get the byte offset into x array */
  	mask = l_mask_array[bit_pos]; 	/* get the mask for this bit */

  	for(col = left; col <= right; col++)
  	{
    	l_display_array[byte_offset][col] &= ~mask;
  	}
}


/*
**
** Clears a vertical line into display memory starting at the top
** going to the bottom in the given column. No runtime error checking 
** is performed. It is assumed that top is less than bottom and that 
** the column is in range.
**
*/

void lcd_clr_vert_line(unsigned char top, unsigned char bottom,
		               unsigned char column)
{
	unsigned char bit_pos;
	unsigned char byte_offset;
	unsigned char y_bits;
	unsigned char remaining_bits;
	unsigned char mask;

	bit_pos = top & 0x07;		   /* get starting bit offset into byte */

	byte_offset = top >> 3;		   /* get byte offset into y direction */
	y_bits = (bottom - top) + 1;   /* get length in the x direction to write */
	remaining_bits = 8 - bit_pos;  /* number of bits left in byte */
	mask = l_mask_array[bit_pos];  /* get mask for this bit */

	while(y_bits)				   /* while there are still bits to write */
	{
		if((remaining_bits == 8) && (y_bits > 7))
		{
			/* here if we are byte aligned and have at least 1 byte to write */
			/* do the entire byte at once instead of bit by bit */
			while(y_bits > 7)			/* while there are at least 8 more bits to do */
			{
				l_display_array[byte_offset][column] = 0x00;
				byte_offset++;
				y_bits -= 8;
			}
		}
		else
		{
      		/* we are not byte aligned or an entire byte does not need written */
      		/* do each individual bit                                          */
			l_display_array[byte_offset][column] &= ~mask;
			if(l_mask_array[0] & 0x80)
			{
				mask >>= 1;
			}
			else
			{
				mask <<= 1;
			}
			y_bits--;
			remaining_bits--;
			if(remaining_bits == 0)
			{
				/* might have bust gotton byte aligned */
				/* so reset for beginning of a byte */
				remaining_bits = 8;
				byte_offset++;
				mask = l_mask_array[0];
			}
		}
	}
}

/*
**
** 	Draws a box in display memory starting at the left/top and going
**  to the right/bottom. No runtime error checking is performed.
**  It is assumed that left is less than right and that top is less 
**  than bottom.
** 
*/

void lcd_box(unsigned char left, unsigned char top,
             unsigned char right, unsigned char bottom)
{
  	/* to draw a box requires two vertical lines */
  	lcd_vert_line(top,bottom,left);
  	lcd_vert_line(top,bottom,right);

  	/* and two horizonal lines */
  	lcd_horz_line(left,right,top);
  	lcd_horz_line(left,right,bottom);
}

/*
**
** Clears a box in display memory starting at the Top left and going
** to the bottom right. No runtime error checking is performed and
** it is assumed that Left is less than Right and that Top is less 
** than Bottom.
**
*/

void lcd_clr_box(unsigned char left, unsigned char top,
             unsigned char right, unsigned char bottom)
{
  	/* to undraw the box undraw the two vertical lines */
  	lcd_clr_vert_line(top,bottom,left);
  	lcd_clr_vert_line(top,bottom,right);

  	/* and the two horizonal lines that comprise it */
  	lcd_clr_horz_line(left,right,top);
    lcd_clr_horz_line(left,right,bottom);
}

/*
**
** Writes a glyph to the display at location x,y
**
** Arguments are:
**    column     - x corrdinate of the left part of glyph          
**    row        - y coordinate of the top part of glyph       
**    width  	 - size in pixels of the width of the glyph    
**    height 	 - size in pixels of the height of the glyph   
**    glyph      - an unsigned char pointer to the glyph pixels 
**                 to write assumed to be of length "width"
**
*/

void lcd_glyph(unsigned char left, unsigned char top,
			   unsigned char width, unsigned char height,
			   unsigned char *glyph, unsigned char store_width)
{
	unsigned char bit_pos;
	unsigned char byte_offset;
	unsigned char y_bits;
	unsigned char remaining_bits;
	unsigned char mask;
	unsigned char char_mask;
	unsigned char x;
	unsigned char *glyph_scan;
	unsigned char glyph_offset;

  	bit_pos = top & 0x07;		/* get the bit offset into a byte */

	glyph_offset = 0;			/* start at left side of the glyph rasters */
    char_mask = 0x80;			/* initial character glyph mask */

  	for (x = left; x < (left + width); x++)
  	{
    	byte_offset = top >> 3;        	/* get the byte offset into y direction */
		y_bits = height;				/* get length in y direction to write */
		remaining_bits = 8 - bit_pos;	/* number of bits left in byte */
		mask = l_mask_array[bit_pos];	/* get mask for this bit */
		glyph_scan = glyph + glyph_offset;	 /* point to base of the glyph */

    	/* boundary checking here to account for the possibility of  */
    	/* write past the bottom of the screen.                        */
    	while((y_bits) && (byte_offset < Y_BYTES)) /* while there are bits still to write */
    	{
			/* check if the character pixel is set or not */
			if(*glyph_scan & char_mask)
			{
				l_display_array[byte_offset][x] |= mask;	/* set image pixel */
			}
			else
			{
      			l_display_array[byte_offset][x] &= ~mask;	/* clear the image pixel */
			}

			if(l_mask_array[0] & 0x80)
			{
				mask >>= 1;
			}
			else
			{
				mask <<= 1;
			}
			
			y_bits--;
			remaining_bits--;
      		if(remaining_bits == 0)
      		{
				/* just crossed over a byte boundry, reset byte counts */
				remaining_bits = 8;
				byte_offset++;
				mask = l_mask_array[0];
      		}

			/* bump the glyph scan to next raster */
			glyph_scan += store_width;
		}

		/* shift over to next glyph bit */
		char_mask >>= 1;
		if(char_mask == 0)				/* reset for next byte in raster */
		{
			char_mask = 0x80;
			glyph_offset++;
	    }
	}
}

/*
**
**	Prints the given string at location x,y in the specified font.
**  Prints each character given via calls to lcd_glyph. The entry string
**  is null terminated and non 0x20->0x7e characters are ignored.
**
**  Arguments are:                                                   
**      left       coordinate of left start of string.                
**      top        coordinate of top of string.
**      font       font number to use for display                
**      str   	   text string to display
**
*/

void lcd_text(unsigned char left, unsigned char top, unsigned char font, char *str)
{
  	unsigned char x = left;
  	unsigned char glyph;
  	unsigned char width;
	unsigned char height;
	unsigned char store_width;
	unsigned char code *glyph_ptr;

  	while(*str != 0x00)
  	{
    	glyph = (unsigned char)*str;

		/* check to make sure the symbol is a legal one */
		/* if not then just replace it with the default character */
		if((glyph < fonts[font].glyph_beg) || (glyph > fonts[font].glyph_end))
		{
			glyph = fonts[font].glyph_def;
		}

    	/* make zero based index into the font data arrays */
    	glyph -= fonts[font].glyph_beg;
    	width = fonts[font].fixed_width;	/* check if it is a fixed width */
		if(width == 0)
		{
			width=fonts[font].width_table[glyph];	/* get the variable width instead */
		}

		height = fonts[font].glyph_height;
		store_width = fonts[font].store_width;

		glyph_ptr = fonts[font].glyph_table + ((unsigned int)glyph * (unsigned int)store_width * (unsigned int)height);

		/* range check / limit things here */
		if(x > SCRN_RIGHT)
		{
			x = SCRN_RIGHT;
		}
		if((x + width) > SCRN_RIGHT+1)
		{
			width = SCRN_RIGHT - x + 1;
		}
		if(top > SCRN_BOTTOM)
		{
			top = SCRN_BOTTOM;
		}
		if((top + height) > SCRN_BOTTOM+1)
		{
			height = SCRN_BOTTOM - top + 1;
		}

		lcd_glyph(x,top,width,height,glyph_ptr,store_width);  /* plug symbol into buffer */

		x += width;							/* move right for next character */
		str++;								/* point to next character in string */
	}
}

/*
**
** Updates area of the display. Writes data from display 
** RAM to the lcd display controller.
** 
** Arguments Used:                                      
**    top     top line of area to update.         
**    bottom  bottom line of area to update.
**
*/

void lcd_update(unsigned char top, unsigned char bottom)
{
	unsigned char x;
	unsigned char y;
	unsigned char yt;
	unsigned char yb;
	unsigned char *colptr;

	yt = top >> 3;				/* setup bytes of range */
	yb = bottom >> 3;

	for(y = yt; y <= yb; y++)
	{
		/* setup the page number for the y direction */
		lcd_out_ctl(LCD_SET_PAGE+y);	/* set page */
	
		/* setup column of update to left side */
		lcd_out_ctl(LCD_SET_COL_HI+(4/16));	/* set column 4 */
		lcd_out_ctl(LCD_SET_COL_LO+(4%16));

		colptr = &l_display_array[y][0];
		for (x=0; x < X_BYTES; x++)
		{
			lcd_out_dat(*colptr++);
		}
	}
}
      

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色噜噜狠狠色综合中国| 国产视频亚洲色图| 精品蜜桃在线看| 亚洲日本电影在线| 男女性色大片免费观看一区二区 | 午夜a成v人精品| 国产福利精品一区二区| 欧美精品乱码久久久久久| 国产精品午夜春色av| 另类综合日韩欧美亚洲| 91久久一区二区| 国产精品日日摸夜夜摸av| 国产一区二区三区综合| 欧美一卡在线观看| 亚洲小说欧美激情另类| 91一区一区三区| 国产精品欧美极品| 国产一区中文字幕| 日韩欧美中文字幕制服| 亚洲一区二区精品3399| 91久久国产最好的精华液| 国产精品蜜臀在线观看| 国产美女av一区二区三区| 精品精品国产高清一毛片一天堂| 亚洲成人免费在线观看| 精品污污网站免费看| 亚洲人成网站精品片在线观看| 国产精品综合久久| 久久久久久**毛片大全| 蜜桃av一区二区三区电影| 欧美精品成人一区二区三区四区| 亚洲成年人影院| 久久一区二区视频| 精品一区二区三区免费播放| 欧美一区二区三区四区五区| 美女国产一区二区三区| 日韩一级免费一区| 精品一区二区三区影院在线午夜| www久久精品| 国产91丝袜在线播放| 国产精品高清亚洲| 色一情一乱一乱一91av| 性做久久久久久免费观看欧美| 精品视频免费看| 婷婷成人综合网| 宅男噜噜噜66一区二区66| 奇米亚洲午夜久久精品| 精品国精品国产尤物美女| 国产精品 日产精品 欧美精品| 久久久久青草大香线综合精品| 国产不卡在线一区| 最新高清无码专区| 在线观看日韩电影| 视频一区欧美精品| 精品久久一区二区| 不卡一区二区三区四区| 一区二区三区在线观看国产| 欧美日韩精品欧美日韩精品一综合| 国产福利一区二区三区在线视频| 欧美经典一区二区三区| 91日韩在线专区| 午夜精品久久久| 久久综合狠狠综合久久综合88| 不卡一区在线观看| 图片区小说区国产精品视频| 欧美精品一区二区三区在线播放| 波多野结衣中文字幕一区二区三区| 一区二区视频在线看| 日韩精品一区二区在线| 国产很黄免费观看久久| 亚洲一区电影777| 精品国产3级a| 欧美自拍偷拍一区| 国产麻豆日韩欧美久久| 亚洲一区二区三区免费视频| 精品粉嫩aⅴ一区二区三区四区| 99r精品视频| 麻豆国产精品一区二区三区| 综合激情网...| 精品美女一区二区三区| 91老司机福利 在线| 激情av综合网| 亚州成人在线电影| 日韩毛片视频在线看| 欧美成人aa大片| 欧美天天综合网| jlzzjlzz国产精品久久| 国产一区二区看久久| 亚洲丰满少妇videoshd| 一区二区中文字幕在线| 精品国产成人在线影院| 欧美绝品在线观看成人午夜影视| www.一区二区| 国产一区二区不卡在线| 日韩经典一区二区| 亚洲午夜精品一区二区三区他趣| 中文字幕亚洲欧美在线不卡| www国产成人免费观看视频 深夜成人网| 欧洲一区在线观看| 91网上在线视频| 99久久精品费精品国产一区二区| 国产一区在线视频| 蜜桃久久av一区| 日本美女一区二区| 亚洲成人av电影在线| 亚洲国产另类av| 一级特黄大欧美久久久| 亚洲免费av观看| 亚洲精品自拍动漫在线| 国产精品电影院| 亚洲三级小视频| 亚洲蜜臀av乱码久久精品| 国产欧美视频一区二区| 国产丝袜欧美中文另类| 久久女同精品一区二区| 久久蜜臀中文字幕| 国产午夜一区二区三区| 国产精品狼人久久影院观看方式| 久久天堂av综合合色蜜桃网| 久久精品一区四区| 日本一区二区三区四区| 欧美国产精品一区| 国产精品久久久久永久免费观看| 国产精品色哟哟| 亚洲自拍偷拍综合| 日韩精品欧美成人高清一区二区| 日日摸夜夜添夜夜添亚洲女人| 日韩激情在线观看| 久久草av在线| 成人免费精品视频| 精品国产亚洲一区二区三区在线观看| 91精品一区二区三区在线观看| 日韩网站在线看片你懂的| 亚洲精品在线观看视频| 日本一区二区动态图| 亚洲欧美日韩国产综合在线| 亚洲一区二区三区在线看| 天堂av在线一区| 国产乱人伦精品一区二区在线观看| 懂色av中文一区二区三区| 色中色一区二区| 日韩精品在线看片z| 国产精品伦理在线| 亚洲va欧美va天堂v国产综合| 蜜芽一区二区三区| 成人一区二区视频| 欧美日韩精品一区二区三区| 欧美第一区第二区| 国产精品久久久一本精品| 亚洲国产欧美在线人成| 国产中文一区二区三区| 色综合久久久久综合| 日韩一区二区电影| 中文字幕精品综合| 亚洲大片免费看| 成人激情校园春色| 欧美精品在线观看播放| 中文子幕无线码一区tr| 亚洲成a人片在线观看中文| 国产综合色精品一区二区三区| 91亚洲资源网| 久久久不卡网国产精品一区| 夜夜揉揉日日人人青青一国产精品 | 欧美一级黄色录像| 亚洲视频一二三区| 久久99国产精品久久99| 91麻豆精品一区二区三区| 欧美成人乱码一区二区三区| 亚洲免费在线看| 国产毛片精品视频| 欧美一级艳片视频免费观看| 亚洲欧美成人一区二区三区| 国产精品中文有码| 3751色影院一区二区三区| 中文字幕中文字幕一区二区| 另类中文字幕网| 欧美日韩精品一区二区天天拍小说| 久久精品欧美日韩精品| 奇米一区二区三区| 777午夜精品免费视频| 亚洲另类在线视频| 成人一区在线看| 国产清纯在线一区二区www| 琪琪久久久久日韩精品| 欧美日韩在线播放三区四区| 国产精品久久久久久户外露出 | 国产视频911| 免费在线一区观看| 欧美日韩亚洲国产综合| 亚洲色图清纯唯美| 99久久99精品久久久久久| 国产欧美日韩一区二区三区在线观看| 免费一区二区视频| 91精品国产丝袜白色高跟鞋| 亚洲国产cao| 在线播放中文字幕一区| 日韩精品一二三| 日韩免费看的电影| 久久精品国产一区二区| 精品91自产拍在线观看一区|