• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ LCD_WriteRAM函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中LCD_WriteRAM函数的典型用法代码示例。如果您正苦于以下问题:C++ LCD_WriteRAM函数的具体用法?C++ LCD_WriteRAM怎么用?C++ LCD_WriteRAM使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了LCD_WriteRAM函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: LCD_DrawLine

/*******************************************************************************
* Function Name  : LCD_DrawLine
* Description    : Displays a line.
* Input          : - Xpos: specifies the X position.
*                  - Ypos: specifies the Y position.
*                  - Length: line length.
*                  - Direction: line direction.
*                    This parameter can be one of the following values: Vertical
*                    or Horizontal.
* Output         : None
* Return         : None
*******************************************************************************/
void LCD_DrawLine(u8 Xpos, u16 Ypos, u16 Length, u8 Direction)
{
  u32 i = 0;

  LCD_SetCursor(Xpos, Ypos);

  if(Direction == Horizontal)
  {
    LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */
    for(i = 0; i < Length; i++)
    {
      LCD_WriteRAM(TextColor);
    }
  }
  else
  {
    for(i = 0; i < Length; i++)
    {
      LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */
      LCD_WriteRAM(TextColor);
      Xpos++;
      LCD_SetCursor(Xpos, Ypos);
    }
  }
}
开发者ID:HelloYym,项目名称:EmbeddedSystemCourse,代码行数:37,代码来源:lcd.c


示例2: LCD_DrawChar

/*******************************************************************************
* Function Name  : LCD_DrawChar
* Description    : Draws a character on LCD.
* Input          : - Xpos: the Line where to display the character shape.
*                    This parameter can be one of the following values:
*                       - Linex: where x can be 0..9
*                  - Ypos: start column address.
*                  - c: pointer to the character data.
* Output         : None
* Return         : None
*******************************************************************************/
void LCD_DrawChar(u8 Xpos, u16 Ypos, uc16 *c)
{
  u32 index = 0, i = 0;
  u8 Xaddress = 0;

  Xaddress = Xpos;

  LCD_SetCursor(Xaddress, Ypos);

  for(index = 0; index < 24; index++)
  {
    LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */
    for(i = 0; i < 16; i++)
    {
      if((c[index] & (1 << i)) == 0x00)
      {
        LCD_WriteRAM(BackColor);
      }
      else
      {
        LCD_WriteRAM(TextColor);
      }
    }
    Xaddress++;
    LCD_SetCursor(Xaddress, Ypos);
  }
}
开发者ID:HelloYym,项目名称:EmbeddedSystemCourse,代码行数:38,代码来源:lcd.c


示例3: LCDD_DrawLine

/*
 * \brief Draw a line on LCD, horizontal and vertical line are supported.
 *
 * \param x         X-coordinate of line start.
 * \param y         Y-coordinate of line start.
 * \param length    line length.
 * \param direction line direction: 0 - horizontal, 1 - vertical.
 * \param color     Pixel color.
 */
void LCDD_DrawLine(
    uint32_t x,
    uint32_t y,
    uint32_t length,
    uint32_t direction,
    uint32_t color)
{
    uint32_t i = 0;

    LCD_SetCursor(x, y);

    if(direction == DIRECTION_HLINE) {
        LCD_WriteRAM_Prepare();
        for(i = 0; i < length; i++) {
            LCD_WriteRAM(color);
        }
    }
    else {
        for(i = 0; i < length; i++) {
            LCD_WriteRAM_Prepare();
            LCD_WriteRAM(color);
            y++;
            LCD_SetCursor(x, y);
        }
    }
}
开发者ID:gabrielleLQX,项目名称:Downloads,代码行数:35,代码来源:draw.c


示例4: LCD_DrawChar

/**
  * @brief  Draws a character on LCD.
  * @param  Xpos: the Line where to display the character shape.
  * @param  Ypos: start column address.
  * @param  c: pointer to the character data.
  * @retval None
  */
void LCD_DrawChar(uint8_t Xpos, uint16_t Ypos, const uint16_t *c)
{
  uint32_t index = 0, i = 0;
  uint8_t Xaddress = 0;
   
  Xaddress = Xpos;
  
  LCD_SetCursor(Xaddress, Ypos);
  
  for(index = 0; index < 24; index++)
  {
    LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */
    for(i = 0; i < 16; i++)
    {
      if((c[index] & (1 << i)) == 0x00)
      {
        LCD_WriteRAM(BackColor);
      }
      else
      {
        LCD_WriteRAM(TextColor);
      }
    }   
    LCD_CtrlLinesWrite(LCD_NCS_GPIO_PORT, LCD_NCS_PIN, Bit_SET); 
    Xaddress++;
    LCD_SetCursor(Xaddress, Ypos);
  }
}
开发者ID:phungyen,项目名称:stm32f10x_stdperiph_lib,代码行数:35,代码来源:stm3210c_eval_lcd.c


示例5: dis_baiye

/*******************************************************************************
* Function Name  : dis_baiye
* Description    : display the picture as the type of baiye windows
* author         :zhangxianyuan
* Input          : - file: pointer to the source file name
*                  - line: assert_param error line source number
* Output         : None
* Return         : None
*******************************************************************************/
void dis_baiye(void) 
{	
	int i, j, m, n, x;  
	unsigned int dd;   	  
 //	address_set(0, 0, 239, 319);
//	LCD_Clear(White);
	for(j = 0; j <= 60; j++)
	{	
 		for(m = 0; m < 4 ;m++)
		{
		 	if(m % 2 == 1)
		 	{
			 	x = 1;
		 	}	
			for(n = 0; n< 2; n++)
			{
				address_set(60 * m + j,160 * n + 80 * x,60 * m + j, 160 * n + 80 + 80 * x);
				for(i = 320 * (60 * m + j) + 160 * n + 80 * x; i < 320 *(60 * m + j) + 160 * n + 80 + 80 * x; i++)
			 	{
				 	dd = (0x00 | gImage_111[i * 2 + 1]) << 8;
				  	dd = dd | gImage_111[ i * 2];
				  	LCD_WriteRAM(dd);
			  	}
				    	  
			}
			x = 0;
		 }
    	 Delay(5000);
	}

	for(j = 0;j <= 60; j++)
	{	
		 for(m = 0; m < 4; m++)
		 {
		 	if(m % 2 == 0)
		 	{
			 	x = 1;
		 	}	
			for(n = 0; n < 2; n++)
			{
				address_set(60 * (m + 1) - j, 160 * n + 80 * x, 60 * (m + 1) - j, 160 * n + 80 + 80 * x);
				for(i = 320 * (60 * (m + 1) - j) + 160 * n + 80 * x; i < 320 * (60 * (m + 1) - j) + 160 * n + 80 + 80 * x; i++)
			 	{
				 	dd = (0x00 | gImage_111[i * 2 + 1]) << 8;
				  	dd = dd|gImage_111[i * 2];
				  	LCD_WriteRAM(dd);
			  	}    	  
			}
			x = 0;
		   }
    	   Delay(10000);
	}
}
开发者ID:hulongchuan,项目名称:hulongchuan,代码行数:62,代码来源:lcd.c


示例6: LCD_WriteBMP

/*******************************************************************************
* Function Name  : LCD_WriteBMP
* Description    : Displays a bitmap picture loaded in the internal Flash.
* Input          : - BmpAddress: Bmp picture address in the internal Flash.
* Output         : None
* Return         : None
*******************************************************************************/
void LCD_WriteBMP(u32 BmpAddress)
{
  u32 index = 0, size = 0;

  /* Read bitmap size */
  size = *(vu16 *) (BmpAddress + 2);
  size |= (*(vu16 *) (BmpAddress + 4)) << 16;

  /* Get bitmap data address offset */
  index = *(vu16 *) (BmpAddress + 10);
  index |= (*(vu16 *) (BmpAddress + 12)) << 16;

  size = (size - index)/2;

  BmpAddress += index;

  /* Set GRAM write direction and BGR = 1 */
  /* I/D=00 (Horizontal : decrement, Vertical : decrement) */
  /* AM=1 (address is updated in vertical writing direction) */
  LCD_WriteReg(R3, 0x1008);

  LCD_WriteRAM_Prepare();

  for(index = 0; index < size; index++)
  {
    LCD_WriteRAM(*(vu16 *)BmpAddress);
    BmpAddress += 2;
  }

  /* Set GRAM write direction and BGR = 1 */
  /* I/D = 01 (Horizontal : increment, Vertical : decrement) */
  /* AM = 1 (address is updated in vertical writing direction) */
  LCD_WriteReg(R3, 0x1018);
}
开发者ID:HelloYym,项目名称:EmbeddedSystemCourse,代码行数:41,代码来源:lcd.c


示例7: LCD_WriteBMP

/**
  * @brief  Displays a bitmap picture loaded in the internal Flash.
  * @param  BmpAddress: Bmp picture address in the internal Flash.
  * @retval None
  */
static void LCD_WriteBMP(uint16_t Xpos, uint16_t Ypos, uint8_t *pbmp)
{
  uint32_t index = 0, size = 0;
  /* Read bitmap size */
  size = *(__IO uint16_t *) (pbmp + 2);
  size |= (*(__IO uint16_t *) (pbmp + 4)) << 16;
  /* Get bitmap data address offset */
  index = *(__IO uint16_t *) (pbmp + 10);
  index |= (*(__IO uint16_t *) (pbmp + 12)) << 16;
  size = (size - index)/2;
  pbmp += index;
  /* Set GRAM write direction and BGR = 1 */
  /* I/D=00 (Horizontal : decrement, Vertical : decrement) */
  /* AM=1 (address is updated in vertical writing direction) */
  LCD_WriteReg(SSD2119_ENTRY_MODE_REG, ENTRY_MODE_BMP);

  LCD_SetCursor(Xpos, Ypos);

  LCD_WriteRAM_Prepare();

  for(index = 0; index < size; index++)
  {
    LCD_WriteRAM(*(__IO uint16_t *)pbmp);
    pbmp += 2;
  }

  /* Set GRAM write direction and BGR = 1 */
  /* I/D = 01 (Horizontal : increment, Vertical : decrement) */
  /* AM = 1 (address is updated in vertical writing direction) */
  LCD_WriteReg(SSD2119_ENTRY_MODE_REG, ENTRY_MODE_DEFAULT);
}
开发者ID:glocklueng,项目名称:STM32F4-Dev,代码行数:36,代码来源:stm32f4_discovery_lcd.c


示例8: Show_Image

/**
* @brief  Show_Image 
*         Displays BMP image
* @param  None
* @retval None
*/
static void Show_Image(void)
{
  uint16_t i = 0;
  uint16_t numOfReadBytes = 0;
  FRESULT res; 

  LCD_SetDisplayWindow(0, 0, 320, 240);
  LCD_WriteReg(SSD2119_ENTRY_MODE_REG, ENTRY_MODE_BMP);
  LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */

  /* Bypass Bitmap header */ 
  f_lseek (&file, 54);
  
  while (HCD_IsDeviceConnected(&USB_OTG_Core))
  {
    res = f_read(&file, Image_Buf, IMAGE_BUFFER_SIZE, (void *)&numOfReadBytes);
    if ((numOfReadBytes == 0) || (res != FR_OK)) {
      /*EOF or Error*/ 
      LCD_WriteReg(SSD2119_ENTRY_MODE_REG, ENTRY_MODE_DEFAULT);		
      break; 
    }
    for (i = 0 ; i < IMAGE_BUFFER_SIZE; i+= 2) {
      LCD_WriteRAM(Image_Buf[i+1] << 8 | Image_Buf[i]); 
    } 
  }
}
开发者ID:nhaberla,项目名称:stm32f4,代码行数:32,代码来源:usbh_usr_lcd.c


示例9: main

int main(void)
{

    static unsigned long TimerCnt = 0;
    static unsigned int temp7670 = 0;					 
	u16 value,val,val1,val2;
	
	Demo_Init();
    ili9320_Initializtion();
    ili9320_Clear(0xffff);
    delay_ms(100);
 	ili9320_SetCursor(0,0);
    LCD_WriteReg(0x0050, 0);
    LCD_WriteReg(0x0052, 0);
    LCD_WriteReg(0x0051, 239);
    LCD_WriteReg(0x0053, 319);
    LCD_WriteRAM_Prepare(); // ©╙от╢Ф
	//delay_ms(10);   
	
	while(1!=OV7670_init());	
    while(1) 
    {
        TimerCnt = 0;
        temp7670 = 0;
        CLK_init_ON(); // OV7670 XCLK ©╙
        while(value & 0x0800)    value = GPIOC->IDR;   // Vsync=H    
        while((~value) & 0x0800) value = GPIOC->IDR;   // Vhync=L 
        
        CLK_init_OFF(); //OV7670 XCLK ╧ь
		while(TimerCnt < 76800)
        {
			XCLK_L; 
            XCLK_H;
			value = GPIOC->IDR;
			temp7670 ++;
            
			if(value & 0x0100) // HREF = H ||(LCD_PCLK_STATE)
            {	
			  	 //value = GPIOC->IDR;
			  	 //display[TimerCnt]=value; 
			  
			   if((temp7670 == 1))// ╦ъвж╫з||(value & 0x0200) ||(LCD_PCLK_STATE) 
                {
                  	val1=value& 0x00ff;

                }
                else // ╣мвж╫з	 if((temp7670 != 1)||(LCD_PCLK_STATE))  
                {
                   	val2= value<<8  ; 	 //
					val =ili9320_BGR2RGB(val1 |val2);
                    temp7670 = 0;
                    LCD_WriteRAM(val); //TFT GRAM йЩ╬щ
                    TimerCnt ++;
                }
            } 
		
				
		}
  }  
}
开发者ID:Andy46,项目名称:OV7670-VHDL,代码行数:60,代码来源:main.c


示例10: LCD_SC_DoDisp

/***********************************************************************
  * @brief  Just do dispaly the data in ram.
  * @param  None
  * @retval None
************************************************************************/
static void LCD_SC_DoDisp(void)
{   
    LCD_WriteRAM(LCD_RAMRegister_0, lcd_ram.com0);
    LCD_WriteRAM(LCD_RAMRegister_1, (uint8_t)(lcd_ram.com0 >> 8));
	
	LCD_WriteRAM(LCD_RAMRegister_3, lcd_ram.com1 << 4);
    LCD_WriteRAM(LCD_RAMRegister_4, (uint8_t)(lcd_ram.com1 >> 4));
	LCD_WriteRAM(LCD_RAMRegister_5, (uint8_t)(lcd_ram.com1 >> 12));
	
	LCD_WriteRAM(LCD_RAMRegister_7, lcd_ram.com2);
    LCD_WriteRAM(LCD_RAMRegister_8, (uint8_t)(lcd_ram.com2 >> 8));
	
	LCD_WriteRAM(LCD_RAMRegister_10, lcd_ram.com3 << 4);
    LCD_WriteRAM(LCD_RAMRegister_11, (uint8_t)(lcd_ram.com3 >> 4));
	LCD_WriteRAM(LCD_RAMRegister_12, (uint8_t)(lcd_ram.com3 >> 12));
}
开发者ID:glocklueng,项目名称:SmartAmmeter_STM8L,代码行数:21,代码来源:lcd_sc.c


示例11: lcd_wr_pixel

/**
 * LCD写字符子程序
 */
void lcd_wr_pixel(unsigned int a, unsigned int b, unsigned int e)    
// X, Y,颜色
{
	LCD_WriteReg(0x20, a);
    LCD_WriteReg(0x21, b);
	LCD_WriteRAM(e);
}
开发者ID:jiesse,项目名称:time-meter,代码行数:10,代码来源:LCD_TFT.c


示例12: LCD_DrawBMP

/*******************************************************************************
* Function Name  : LCD_DrawBMP
* Description    : Displays a bitmap picture loaded in the SPI Flash.
* Input          : - BmpAddress: Bmp picture address in the SPI Flash.
* Output         : None
* Return         : None
*******************************************************************************/
void LCD_DrawBMP(uc16 *BmpAddress)
{
    u32 i = 0, size = 0;

    /* Read bitmap size */
    size = BmpAddress[1] | (BmpAddress[2] << 16);

    /* get bitmap data address offset */
    i = BmpAddress[5] | (BmpAddress[6] << 16);

    size = (size - i)/2;

    BmpAddress += i/2;
    /* Set GRAM write direction and BGR = 1 */
    /* I/D=00 (Horizontal : decrement, Vertical : decrement) */
    /* AM=1 (address is updated in vertical writing direction) */
    LCD_WriteReg(R3, 0x1008);

    LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */

    /* Read bitmap data from SPI Flash and send them to LCD */
    for(i = 0; i < size; i++) {
        LCD_WriteRAM(BmpAddress[i]);
    }

    LCD_CtrlLinesWrite(GPIOB, CtrlPin_NCS, Bit_SET);

    /* Set GRAM write direction and BGR = 1 */
    /* I/D = 01 (Horizontal : increment, Vertical : decrement) */
    /* AM = 1 (address is updated in vertical writing direction) */
    LCD_WriteReg(R3, 0x1018);
}
开发者ID:peterliu2,项目名称:FreeRTOS,代码行数:39,代码来源:lcd.c


示例13: LCD_PutPixel_HX8347A

void LCD_PutPixel_HX8347A(uint16_t x, uint16_t y)
{
	LCD_SetWindow(x, y, x, y);
	LCD_WriteRAM_Prepare();
	LCD_WriteRAM(TextColor>>16);
	LCD_WriteRAM(TextColor);
}
开发者ID:AndreyFursov,项目名称:AFGUI,代码行数:7,代码来源:lcdHAL_HX8347A.c


示例14: LCD_Clear

/**
  * @brief  Clears the hole LCD.
  * @param  Color: the color of the background.
  * @retval None
  */
void LCD_Clear(uint16_t Color)
{
  uint32_t index = 0;

  if(LCDType == LCD_HX8347D)
  {
    LCD_SetCursor(0, 0);
  }
  else
  {
    LCD_SetCursor(0, 319);
  }  
 
  /* Prepare to write GRAM */
  LCD_WriteRAM_Prepare();
  
  for(index = 0; index < (uint32_t)320*240; index++)
  {
    LCD_WriteRAM(Color);
  }
  
  /* Wait until a data is sent(not busy), before config /CS HIGH */
  while (SPI_I2S_GetFlagStatus(LCD_SPI, SPI_I2S_FLAG_BSY) != RESET);
  LCD_CtrlLinesWrite(LCD_NCS_GPIO_PORT, LCD_NCS_PIN, Bit_SET);  
}
开发者ID:clarenceliu,项目名称:Mplib,代码行数:30,代码来源:stm32303c_eval_lcd.c


示例15: LCD_WriteRAMWord

/*******************************************************************************
* Function Name  : LCD_WriteRAMWord
* Description    : Writes 1 word to the LCD RAM.
* Input          : - RGB_Code: the pixel color in RGB mode (5-6-5).
* Output         : None
* Return         : None
*******************************************************************************/
void LCD_WriteRAMWord(u16 RGB_Code)
{
  LCD_WriteRAM_Prepare();

  LCD_WriteRAM(RGB_Code);
  
  LCD_WriteRAM_Ready();
}
开发者ID:hulongchuan,项目名称:hulongchuan,代码行数:15,代码来源:lcd.c


示例16: LCD_WriteRAMWord

/*******************************************************************************
* Function Name  : LCD_WriteRAMWord
* Description    : Writes 1 word to the LCD RAM.
* Input          : - RGB_Code: the pixel color in RGB mode (5-6-5).
* Output         : None
* Return         : None
*******************************************************************************/
void LCD_WriteRAMWord(u16 RGB_Code)
{
    LCD_WriteRAM_Prepare();

    LCD_WriteRAM(RGB_Code);

    LCD_CtrlLinesWrite(GPIOB, CtrlPin_NCS, Bit_SET);
}
开发者ID:peterliu2,项目名称:FreeRTOS,代码行数:15,代码来源:lcd.c


示例17: LCD_DrawCircle

/*******************************************************************************
* Function Name  : LCD_DrawCircle
* Description    : Displays a circle.
* Input          : - Xpos: specifies the X position.
*                  - Ypos: specifies the Y position.
*                  - Height: display rectangle height.
*                  - Width: display rectangle width.
* Output         : None
* Return         : None
*******************************************************************************/
void LCD_DrawCircle(u8 Xpos, u16 Ypos, u16 Radius)
{
  s32  D;/* Decision Variable */
  u32  CurX;/* Current X Value */
  u32  CurY;/* Current Y Value */

  D = 3 - (Radius << 1);
  CurX = 0;
  CurY = Radius;

  while (CurX <= CurY)
  {
    LCD_SetCursor(Xpos + CurX, Ypos + CurY);
    LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */
    LCD_WriteRAM(TextColor);

    LCD_SetCursor(Xpos + CurX, Ypos - CurY);
    LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */
    LCD_WriteRAM(TextColor);

    LCD_SetCursor(Xpos - CurX, Ypos + CurY);
    LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */
    LCD_WriteRAM(TextColor);

    LCD_SetCursor(Xpos - CurX, Ypos - CurY);
    LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */
    LCD_WriteRAM(TextColor);

    LCD_SetCursor(Xpos + CurY, Ypos + CurX);
    LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */
    LCD_WriteRAM(TextColor);

    LCD_SetCursor(Xpos + CurY, Ypos - CurX);
    LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */
    LCD_WriteRAM(TextColor);

    LCD_SetCursor(Xpos - CurY, Ypos + CurX);
    LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */
    LCD_WriteRAM(TextColor);

    LCD_SetCursor(Xpos - CurY, Ypos - CurX);
    LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */
    LCD_WriteRAM(TextColor);

    if (D < 0)
    {
      D += (CurX << 2) + 6;
    }
    else
    {
      D += ((CurX - CurY) << 2) + 10;
      CurY--;
    }
    CurX++;
  }
}
开发者ID:HelloYym,项目名称:EmbeddedSystemCourse,代码行数:66,代码来源:lcd.c


示例18: LCDD_DrawPixel

/**
 * \brief Draw a pixel on LCD of given color.
 *
 * \param x  X-coordinate of pixel.
 * \param y  Y-coordinate of pixel.
 * \param color  Pixel color.
 */
void LCDD_DrawPixel(
    uint32_t x,
    uint32_t y,
    uint32_t color)
{
    LCD_SetCursor(x, y);
    LCD_WriteRAM_Prepare();
    LCD_WriteRAM(color);
}
开发者ID:gabrielleLQX,项目名称:Downloads,代码行数:16,代码来源:draw.c


示例19: LCD_DrawChar_HX8347A

void LCD_DrawChar_HX8347A(uint16_t Xpos, uint16_t Ypos, uint16_t codeChar)
{
	uint32_t index = 0, i = 0, numByte, width, bitCounter, ptrByte;
	// Symbol width
	if (codeChar > LCD_Currentfonts->NumSymb) codeChar = 0;
	if (LCD_Currentfonts->Width)
	{
		width = LCD_Currentfonts->Width;
		LCD_SetWindow(Xpos, Ypos, Xpos+width-1, Ypos+LCD_Currentfonts->Height-1);
	}
	else
	{
		width = LCD_Currentfonts->tableSymbWidth[codeChar];
		LCD_SetWindow(Xpos, Ypos, Xpos+width+LCD_Currentfonts->SymbolSpace-1, Ypos+LCD_Currentfonts->Height-1);
	}
	numByte = LCD_Currentfonts->Height * ((width+7)/8);

	LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */
	// Draw Char
	for(index = 0; index < numByte; index++)
	{
		bitCounter = 0;
		for(i = 0; i < width; i++)
		{

			if (bitCounter > 7)
			{
				bitCounter = 0;
				index++;
			}
			ptrByte = LCD_Currentfonts->table[LCD_Currentfonts->tableSymbIndex[codeChar]+index];
			if(ptrByte & (1<<bitCounter))
			{
				LCD_WriteRAM(TextColor>>16);
				LCD_WriteRAM(TextColor);
			}
			else
			{
				LCD_WriteRAM(BackColor>>16);
				LCD_WriteRAM(BackColor);
			}
			bitCounter++;
		}
开发者ID:AndreyFursov,项目名称:AFGUI,代码行数:43,代码来源:lcdHAL_HX8347A.c


示例20: LCD_DrawMonoPict

/*******************************************************************************
* Function Name  : LCD_DrawMonoPict
* Description    : Displays a monocolor picture.
* Input          : - Pict: pointer to the picture array.
* Output         : None
* Return         : None
*******************************************************************************/
void LCD_DrawMonoPict(uc32 *Pict)
{
    u32 index = 0, i = 0;

    LCD_SetCursor(0, 319);
    LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */

    for(index = 0; index < 2400; index++) {
        for(i = 0; i < 32; i++) {
            if((Pict[index] & (1 << i)) == 0x00) {
                LCD_WriteRAM(BackColor);
            } else {
                LCD_WriteRAM(TextColor);
            }
        }
    }
    LCD_CtrlLinesWrite(GPIOB, CtrlPin_NCS, Bit_SET);

}
开发者ID:peterliu2,项目名称:FreeRTOS,代码行数:26,代码来源:lcd.c



注:本文中的LCD_WriteRAM函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ LCD_clear函数代码示例发布时间:2022-05-30
下一篇:
C++ LCD_WriteData函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap