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

C++ LCD_SetFont函数代码示例

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

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



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

示例1: Display_Init

/**
  * @brief  Display Init (LCD)
  * @param  None
  * @retval None
  */
void Display_Init(void)
{
  /* Initialize the LCD */
#ifdef USE_STM320518_EVAL
    STM320518_LCD_Init();
#else
    STM32072B_LCD_Init();
#endif /* USE_STM320518_EVAL */

  /* Clear the LCD */ 
  LCD_Clear(White);

  /* Set the LCD Text size */
  LCD_SetFont(&Font8x12);

  /* Set the LCD Back Color and Text Color*/
  LCD_SetBackColor(Blue);
  LCD_SetTextColor(White);

  /* Display */
  LCD_DisplayStringLine(LINE(0x13), "  ADC conversion example (Basic example)");

  /* Set the LCD Text size */
  LCD_SetFont(&Font16x24);

  LCD_DisplayStringLine(LINE(0), MESSAGE1);
  LCD_DisplayStringLine(LINE(1), MESSAGE2);
  
  /* Set the LCD Back Color and Text Color*/
  LCD_SetBackColor(White);
  LCD_SetTextColor(Blue);
     
}
开发者ID:Lee-Kevin,项目名称:MotorBridgeCapeFirmwareSourceCode,代码行数:38,代码来源:main.c


示例2: Draw_Logo

/*******************************************************************************
* Function Name  : Draw_Logo
* Description    : 
* Input          : None
* Return         : None
*******************************************************************************/
void Draw_Logo(void)
{
	char txt[20] = "ver  ";

	LCD_FillScreen(Black);	// очищаем экран выбранным цветом 
	LCD_SetTextColor(DarkOrange2);	// установить цвет текста
	LCD_SetFont(&arialUnicodeMS_16ptFontInfo); // установить шрифт	16
	LCD_PutStrig(45, 122, 1, "NeilScope 3");
	
	LCD_SetTextColor(LightGray4);	// установить цвет текста
	LCD_SetFont(&lucidaConsole10ptFontInfo); // установить шрифт	10

	sprintf(&txt[4], "%d", __FIRMWARE_VERSION__);
	strcat(txt, " rev ");
	strcat(txt, __FIRMWARE_REVISION__);
	
	LCD_PutStrig(100, 110, 1, txt);
	LCD_PutStrig(100, 95, 1, "design by: Left Radio, Muha and others.");
	LCD_PutStrig(100, 80, 1, "full open HW/FW project");

	LCD_SetTextColor(DarkAuqa);
	LCD_PutStrig(180, 5, 0, "http://hobby-research.at.ua");

	delay_ms(1000);
	delay_ms(1000);
	delay_ms(1000);
}
开发者ID:assets1975,项目名称:neil-scope3,代码行数:33,代码来源:User_Interface.c


示例3: Display_Init

/**
  * @brief  Display Init (LCD)
  * @param  None
  * @retval None
  */
void Display_Init(void)
{
  /* Initialize the LCD */
  STM32303C_LCD_Init();

  /* Clear the LCD */ 
  LCD_Clear(White);

  /* Set the LCD Text size */
  LCD_SetFont(&Font8x12);

  /* Set the LCD Back Color and Text Color*/
  LCD_SetBackColor(Blue);
  LCD_SetTextColor(White);

  /* Display */
  LCD_DisplayStringLine(LINE(0x13), (uint8_t*)"  ADC conversion example (Diff example)");

  /* Set the LCD Text size */
  LCD_SetFont(&Font16x24);

  LCD_DisplayStringLine(LINE(0), (uint8_t*)"STM32F303x CortexM4 ");
  LCD_DisplayStringLine(LINE(1), (uint8_t*)"   STM32303C-EVAL   ");
  
  /* Set the LCD Back Color and Text Color*/
  LCD_SetBackColor(White);
  LCD_SetTextColor(Blue);

  /* Display */
  LCD_DisplayStringLine(LINE(3),(uint8_t*)"  Turn RV2(PC.01)    ");
  LCD_DisplayStringLine(LINE(4),(uint8_t*)"   Potentiometer     ");
     
}
开发者ID:jeasinema,项目名称:STM32F3_Model,代码行数:38,代码来源:main.c


示例4: Display_Init

/**
  * @brief  Display Init (LCD)
  * @param  None
  * @retval None
  */
void Display_Init(void)
{
  /* Initialize the LCD */
  STM320518_LCD_Init();

  /* Clear the LCD */ 
  LCD_Clear(White);

  /* Set the LCD Text size */
  LCD_SetFont(&Font8x12);

  /* Set the LCD Back Color and Text Color*/
  LCD_SetBackColor(Blue);
  LCD_SetTextColor(White);

  /* Display */
  LCD_DisplayStringLine(LINE(0x13), "         ADC DMA conversion example         ");

  /* Set the LCD Text size */
  LCD_SetFont(&Font16x24);

  LCD_DisplayStringLine(LINE(0), " STM32F05x CortexM0 ");
  LCD_DisplayStringLine(LINE(1), "   STM320518-EVAL   ");
  
  /* Set the LCD Back Color and Text Color*/
  LCD_SetBackColor(White);
  LCD_SetTextColor(Blue);

  /* Display */
  LCD_DisplayStringLine(LINE(3),"  Turn RV3(PC.01)    ");
}
开发者ID:OomD,项目名称:STM32F0-Discovery,代码行数:36,代码来源:main.c


示例5: setGrid

/**
* @brief  Set Grid
* @param  void
* @retval Null
*/
void setGrid(){
    LCD_SetFont(&Font8x8);
	  LCD_SetTextColor(LCD_COLOR_BLACK);
		int i, j;
	  //Draws horizontal lines
    for(i =20; i <= 300; i +=10)
    {		
	   LCD_DrawLine(20, i, 200, LCD_DIR_HORIZONTAL);
		}
		//Draws vertical lines
		for(j = 20; j <= 220; j +=10)
    {		
	   LCD_DrawLine(j, 20, 280, LCD_DIR_VERTICAL);
		}
		LCD_DisplayStringLine(310, (uint8_t*)"         Y DISPLACEMENT     ");
		LCD_DisplayChar(90, 10, (uint8_t)'X');
    LCD_DisplayChar(110, 10, (uint8_t)'D');
		LCD_DisplayChar(120, 10, (uint8_t)'I');
		LCD_DisplayChar(130, 10, (uint8_t)'S');
		LCD_DisplayChar(140, 10, (uint8_t)'P');
		LCD_DisplayChar(150, 10, (uint8_t)'L');
		LCD_DisplayChar(160, 10, (uint8_t)'A');
		LCD_DisplayChar(170, 10, (uint8_t)'C');
		LCD_DisplayChar(180, 10, (uint8_t)'E');
		LCD_DisplayChar(190, 10, (uint8_t)'M');
		LCD_DisplayChar(200, 10, (uint8_t)'E');
		LCD_DisplayChar(210, 10, (uint8_t)'N');
		LCD_DisplayChar(220, 10, (uint8_t)'T');
		LCD_SetFont(&Font12x12);
		LCD_SetTextColor(LCD_COLOR_RED);
}
开发者ID:rmursh,项目名称:MicroP-ECSE426,代码行数:36,代码来源:main.c


示例6: Display_Init

/**
  * @brief  Display Init (LCD)
  * @param  None
  * @retval None
  */
void Display_Init(void)
{
  /* Initialize the LCD */
  STM320518_LCD_Init();

  /* Clear the LCD */ 
  LCD_Clear(White);

  /* Set the LCD Text size */
  LCD_SetFont(&Font8x12);

  /* Set the LCD Back Color and Text Color*/
  LCD_SetBackColor(Blue);
  LCD_SetTextColor(White);

  /* Display */
  LCD_DisplayStringLine(LINE(0x13), "       ADC Low Power Mode example       ");
  /* Set the LCD Text size */
  LCD_SetFont(&Font16x24);

  LCD_DisplayStringLine(LINE(0), "STM32F05x CortexM0  ");
  LCD_DisplayStringLine(LINE(1), "   STM320518-EVAL   ");
  
  /* Set the LCD Back Color and Text Color*/
  LCD_SetBackColor(White);
  LCD_SetTextColor(Blue);

  /* Display */
  LCD_DisplayStringLine(LINE(3)," Turn RV3 PC.1 then ");
  LCD_DisplayStringLine(LINE(4),"  Press KEY button  ");  
}
开发者ID:Qasemt,项目名称:STM32F0xx_StdPeriph_Lib_V1.0.0,代码行数:36,代码来源:main.c


示例7: Display_Init

/**
  * @brief  Display Init (LCD)
  * @param  None
  * @retval None
  */
void Display_Init(void)
{

  /* Initialize the LCD */
  STM322xG_LCD_Init();

  /* Clear the LCD */
  LCD_Clear(White);

  /* Set the LCD Text size */
  LCD_SetFont(&Font8x12);

  /* Set the LCD Back Color and Text Color*/
  LCD_SetBackColor(Blue);
  LCD_SetTextColor(White);

  LCD_DisplayStringLine(LINE(0x13), " STM32F2xx ADC1 VBAT Measurement example");

  /* Set the LCD Text size */
  LCD_SetFont(&Font16x24);

  LCD_DisplayStringLine(LINE(0), "**VBAT Measurement**");

  /* Set the LCD Back Color and Text Color*/
  LCD_SetBackColor(White);
  LCD_SetTextColor(Blue);

  LCD_DisplayStringLine(LINE(2)," Eval Board Instant ");
  LCD_DisplayStringLine(LINE(4),"  Battery Voltage   ");
}
开发者ID:szymon2103,项目名称:Stm32,代码行数:35,代码来源:main.c


示例8: Display_Init

/**
  * @brief  Display Init (LCD)
  * @param  None
  * @retval None
  */
void Display_Init(void)
{
  /* Initialize the LCD */
  STM324xG_LCD_Init();

  /* Clear the LCD */ 
  LCD_Clear(White);

  /* Set the LCD Text size */
  LCD_SetFont(&Font8x12);

  /* Set the LCD Back Color and Text Color*/
  LCD_SetBackColor(Blue);
  LCD_SetTextColor(White);

  /* Display */
  LCD_DisplayStringLine(LINE(0x13), " ADC conversion w/ DMA transfer example ");

  /* Set the LCD Text size */
  LCD_SetFont(&Font16x24);

  /* Display */
  LCD_DisplayStringLine(LINE(0), "ADC Ch3 Conv @2.4Msps");


  /* Set the LCD Back Color and Text Color*/
  LCD_SetBackColor(White);
  LCD_SetTextColor(Blue);

  /* Display */
  LCD_DisplayStringLine(LINE(2),"  Turn RT1(PA.03)    ");
  LCD_DisplayStringLine(LINE(4),"   Potentiometer     ");
}
开发者ID:ahmadrezahossiny,项目名称:stm32f4_extboard_periph_examples,代码行数:38,代码来源:main.c


示例9: DemoCpuTemperature

void DemoCpuTemperature(void)
{
	uint16	i,y;
	
	LCD_ClearScreen();
	LCD_SetPenColor(1);
	LCD_SetFont(1);
	LCD_PrintXY(40,0,"CPU:");
	LCD_PrintXY(80,0,TempString);
		
	LCD_SetFont(0);
	LCD_PrintXY(0,0, "60-");
	LCD_PrintXY(0,18,"50-");
	LCD_PrintXY(0,37,"40-");
	LCD_PrintXY(0,56,"30-");
	LCD_DrawLine(15,0,15,63);

	for(i=16;i<128;i++)
	{
		y = DemoMem[127-i];
		
		if(y > 290) 
		{
			y = ((y - 290) / 5);
			y = 64 - y;
			LCD_PutPixel(i,y,1);
			LCD_PutPixel(i,y+1,1);
		}
	}
}
开发者ID:novia713,项目名称:raspi_lcd,代码行数:30,代码来源:main.c


示例10: CpuTemperatureView

void CpuTemperatureView(void)
{
	uint16_t	i,y;
	MEASUREMENT_VIEW_struct * viewMem = cpu_temp_getViewMem();
	LCD_ClearScreen();
	LCD_SetPenColor(1);
	LCD_SetFont(1);
	LCD_PrintXY(40,0,"CPU:");
	LCD_PrintXY(80,0,viewMem->cur_value);
		
	LCD_SetFont(0);
	LCD_PrintXY(0,0, "60-");
	LCD_PrintXY(0,18,"50-");
	LCD_PrintXY(0,37,"40-");
	LCD_PrintXY(0,56,"30-");
	LCD_DrawLine(15,0,15,63);

	for(i=16;i<128;i++)
	{
		y = viewMem->Mem[127-i];
		
		if(y > 290) 
		{
			y = ((y - 290) / 5);
			y = 64 - y;
			LCD_PutPixel(i,y,1);
			LCD_PutPixel(i,y+1,1);
		}
	}
}
开发者ID:Rost-enTroniX,项目名称:hpks,代码行数:30,代码来源:lcd_display.c


示例11: Display_Init

/**
  * @brief  Display Init (LCD)
  * @param  None
  * @retval None
  */
void Display_Init(void)
{

  /* Initialize the LCD */
  LCD_Init();

  /* Clear the LCD */
  LCD_Clear(White);

  /* Set the LCD Text size */
  LCD_SetFont(&Font8x12);

  /* Set the LCD Back Color and Text Color*/
  LCD_SetBackColor(Blue);
  LCD_SetTextColor(White);

  LCD_DisplayStringLine(LCD_LINE_19, (uint8_t*)" STM32F4xx ADC1 VBAT Measurement example");

  /* Set the LCD Text size */
  LCD_SetFont(&Font16x24);

  LCD_DisplayStringLine(LCD_LINE_0, (uint8_t*)"**VBAT Measurement**");

  /* Set the LCD Back Color and Text Color*/
  LCD_SetBackColor(White);
  LCD_SetTextColor(Blue);

  LCD_DisplayStringLine(LCD_LINE_2, (uint8_t*)" Eval Board Instant ");
  LCD_DisplayStringLine(LCD_LINE_4, (uint8_t*)"  Battery Voltage   ");
}
开发者ID:BlockWorksCo,项目名称:Platform,代码行数:35,代码来源:main.c


示例12: DemoFont

void DemoFont(void)
{
	LCD_ClearScreen();
	LCD_SetFont(0);		LCD_PrintXY(0,0, "Font 0");
	LCD_SetFont(1);		LCD_PrintXY(0,8, "Font 1");
	LCD_SetFont(2);		LCD_PrintXY(0,23,"Font 2");
	LCD_SetFont(3);		LCD_PrintXY(0,39,"Font 3");
}
开发者ID:novia713,项目名称:raspi_lcd,代码行数:8,代码来源:main.c


示例13: Draw_Cursor_Trig

/*******************************************************************************
* Function Name  : Draw_Cursor_Trig
* Description    : указатели триггера
* Input          :
* Return         : None
*******************************************************************************/
void Draw_Cursor_Trig(DrawState NewState, uint16_t ClearColor, uint16_t TextColor)
{
	TrigCursorINFO *tTrigCursor = (pntTrigCursor == &Height_Y_cursor)? &Low_Y_cursor : &Height_Y_cursor;
	uint8_t tmpNewState = NewState;
	uint16_t textColor1, textColor2;

	if((gSyncState.Mode == Sync_NONE) && (NewState == DRAW)) return;

	LCD_SetFont(&lucidaConsole_9pt_Bold_FontInfo);
	LCD_SetTextColor(globalBackColor);

	if(gSyncState.Type > 1)
	{
		if(NewState == DRAW)
		{
			pntTrigCursor->Color = White;
			tTrigCursor->Color = LightGray4;
		}
		else
		{
			pntTrigCursor->Color = ClearColor;
			tTrigCursor->Color = ClearColor;
		}

		textColor1 = TextColor;
		textColor2 = TextColor;
	}
	else
	{
		if(NewState == DRAW) pntTrigCursor->Color = White;
		else pntTrigCursor->Color = ClearColor;

		tTrigCursor->Color = globalBackColor;
		tmpNewState = CLEAR;
		textColor1 = TextColor;
		textColor2 = globalBackColor;
	}


	/* Не активный курсор */
	LCD_DrawFillTriangle(0, tTrigCursor->Position - 3, 0, tTrigCursor->Position + 5,
			leftLimit, tTrigCursor->Position + 1, tTrigCursor->Color);

	Draw_Cursor_Trig_Line(tmpNewState, tTrigCursor);
	LCD_SetTextColor(textColor2);
	LCD_PutStrig(0, tTrigCursor->Position - 2, 1, tTrigCursor->Name);			/* очищаем старые показания */

	/* Активный курсор */
	LCD_DrawFillTriangle(0, pntTrigCursor->Position - 3, 0, pntTrigCursor->Position + 5,
			leftLimit, pntTrigCursor->Position + 1, pntTrigCursor->Color);

	Draw_Cursor_Trig_Line(NewState, pntTrigCursor);

	LCD_SetTextColor(textColor1);
	LCD_PutStrig(0, pntTrigCursor->Position - 2, 1, pntTrigCursor->Name);		/* очищаем старые показания */

	LCD_SetFont(&lucidaConsole10ptFontInfo);
}
开发者ID:assets1975,项目名称:neil-scope3,代码行数:64,代码来源:User_Interface.c


示例14: Display_Init

/**
  * @brief  Display Init (LCD or/and USART)
  * @param  None
  * @retval None
  */
void Display_Init(void)
{
#ifdef PRINT_ON_USART 

 USART_InitTypeDef USART_InitStructure;
  /* USARTx configured as follow:
        - BaudRate = 115200 baud  
        - Word Length = 8 Bits
        - One Stop Bit
        - No parity
        - Hardware flow control disabled (RTS and CTS signals)
        - Receive and transmit enabled
  */
  USART_InitStructure.USART_BaudRate = 115200;
  USART_InitStructure.USART_WordLength = USART_WordLength_8b;
  USART_InitStructure.USART_StopBits = USART_StopBits_1;
  USART_InitStructure.USART_Parity = USART_Parity_No;
  USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;
  USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;

  STM_EVAL_COMInit(COM1, &USART_InitStructure);

  printf("\n\r ========================================\n");
  printf("\n\r ==== Multiple RNG Generator Example ====\n");
  printf("\n\r ======================================== \n\n\r");
  printf("\n\r  Press key button to generate 8 x 32bit random number\n");
#endif

#ifdef PRINT_ON_LCD  
/* Initialize the LCD */
  STM322xG_LCD_Init();

  /* Clear the LCD */ 
  LCD_Clear(White);

  /* Set the LCD Text size */
  LCD_SetFont(&Font8x12);

  /* Set the LCD Back Color and Text Color*/
  LCD_SetBackColor(Blue);
  LCD_SetTextColor(White);

  LCD_DisplayStringLine(LINE(0x13), "  To generate 8x32bit RNG, Press Key  >>");

  /* Set the LCD Text size */
  LCD_SetFont(&Font16x24);

  LCD_DisplayStringLine(LINE(0), "*** RNG  Example ***");

  /* Set the LCD Back Color and Text Color*/
  LCD_SetBackColor(White);
  LCD_SetTextColor(Blue); 

  LCD_DisplayStringLine(LINE(3),"  Press KEY button ");
  LCD_DisplayStringLine(LINE(5),"     to START     ");
#endif
}
开发者ID:JanusRC,项目名称:T2-Terminus,代码行数:62,代码来源:main.c


示例15: Display_Init

/**
  * @brief  Display Init (LCD)
  * @param  None
  * @retval None
  */
static void Display_Init(void)
{
  /* Initialize the LCD */
#ifdef USE_STM320518_EVAL
    STM320518_LCD_Init();
#else
    STM32072B_LCD_Init();
#endif /* USE_STM320518_EVAL */

  /* Clear the LCD */
  LCD_Clear(LCD_COLOR_WHITE);
  
  /* Set the LCD Back Color */
  LCD_SetBackColor(Blue);
  
  /* Set the LCD Text Color */
  LCD_SetTextColor(White);
  
  /* Displays MESSAGE1 on line 1 */
  LCD_DisplayStringLine(LINE(0), (uint8_t *)MESSAGE1);
  
  /* Set the LCD Text Color */
  LCD_SetTextColor(Red);
  
  /* Set the LCD Back Color */
  LCD_SetBackColor(Red);
  LCD_DrawFullRect(31, 292,264,34);
  
  /* Set the LCD Back Color */
  LCD_SetBackColor(White);
  LCD_DrawFullRect(33, 290 ,260,30);
  
  
  /* Set the LCD Text, Back Colors and Text size */
  LCD_SetTextColor(Black); 
  LCD_SetBackColor(Cyan);
  LCD_SetFont(&Font12x12);
  
  LCD_DisplayStringLine(LINE(18), (uint8_t *)MESSAGE2);
  
  /* Set the LCD Back Color */
  LCD_SetBackColor(Blue);
  LCD_SetTextColor(White);
  
  LCD_DisplayStringLine(LINE(19), (uint8_t *)MESSAGE3);
  
  /* Set text size */
  LCD_SetFont(&Font16x24);
  
  /* Set the LCD Text Color */
  LCD_SetTextColor(Blue);
  
}
开发者ID:Lee-Kevin,项目名称:MotorBridgeCapeFirmwareSourceCode,代码行数:58,代码来源:main.c


示例16: LCD_LOG_SetHeader

/**
* @brief  Display the application header (title) on the LCD screen 
* @param  Title :  pointer to the string to be displayed
* @retval None
*/
void LCD_LOG_SetHeader (uint8_t *Title)
{
  sFONT *cFont;

  uint32_t size = 0 , idx,cnt=LCD_PIXEL_WIDTH/cFont->Width+1; 
  uint8_t  *ptr = Title;
  uint8_t  tmp[80];
// #ifdef inch_4
//   uint8_t  tmp[66];
// #endif
// #ifdef inch_7
//   uint8_t  tmp[66];
// #endif	
	
  LCD_SetFont (&Font12x12);
  cFont = LCD_GetFont();
	cnt=LCD_PIXEL_WIDTH/cFont->Width+1;
  /* center the header */
  while (*ptr++) size ++ ;

  /* truncate extra text */
  if(size > cnt)
  {
     size = cnt;
  }
  
  for (idx = 0 ; idx <cnt ; idx ++)
  { 
    tmp[idx] = ' '; 
  }

  for (idx = 0 ; idx < size ; idx ++)
  { 
    tmp[idx + (cnt - size)/2] = Title[idx];
  }
  
  /* Clear the LCD */
  LCD_Clear(Black);
    
  /* Set the LCD Font */
 

  cFont = LCD_GetFont();  
  /* Set the LCD Text Color */
  LCD_SetTextColor(White);
  LCD_SetBackColor(Blue);
  LCD_ClearLine(0);
  LCD_DisplayStringLine(cFont->Height, tmp);
  LCD_ClearLine(2 * cFont->Height);

  LCD_SetBackColor(Black);
  LCD_SetFont (&Font8x12);
}
开发者ID:nowhard,项目名称:STM32F429_TEREX_PANEL,代码行数:58,代码来源:lcd_log.c


示例17: DemoText

void DemoText(void)
{	
	LCD_ClearScreen();
	LCD_SetFont(1);	
	LCD_PrintXY(30,0,"Raspi-LCD");
	LCD_PrintXY(0,12,"www.emsystech.de");
	LCD_SetFont(0);	
	LCD_PrintXY(8,29,"128 x 64 Pixel (BW)");
	LCD_PrintXY(6,38,"White LED Backlight");
	LCD_PrintXY(4,47,"8 Lines with 21 Char ");
	LCD_PrintXY(4,56,"in the smallest Font ");
}
开发者ID:novia713,项目名称:raspi_lcd,代码行数:12,代码来源:main.c


示例18: AbgasTemperatureView

void AbgasTemperatureView(void)
{
	uint16_t	i,y;
	MEASUREMENT_VIEW_struct * viewMem = pt100_getViewMem();
	LCD_ClearScreen();
	LCD_SetPenColor(1);
	LCD_SetFont(0);
	LCD_PrintXY(30,0,"ABGAS:");
	LCD_PrintXY(80,0,viewMem->cur_value);
		
	LCD_SetFont(0);
	
  int max = roundUp(viewMem->max);
  int min  = roundDown(viewMem->min);
  int diff = max-min;
  int span;
  if(!diff) {
    span = 10;
    if(min) min -= 10;
  }else {
    span = diff/3;
  }
  
  if(span < 10) span = 10;
  
  char dummy[10];
 
    sprintf(dummy,"%4u-",min+(span*3));
    LCD_PrintXY(0,0, dummy);
    
    sprintf(dummy,"%4u-",min+(span*2));
    LCD_PrintXY(0,18,dummy);
    
    sprintf(dummy,"%4u-",min+(span*1));
    LCD_PrintXY(0,37,dummy);
    
    sprintf(dummy,"%4u-",min);
    LCD_PrintXY(0,56,dummy);

  
	LCD_DrawLine(27,0,27,63);
  diff = (span*3);
  
	for(i=27;i<128;i++)
	{
		y = viewMem->Mem[127-i];
		y =  64 - ((double)(y-min)*(double)(64.0/diff));
		LCD_PutPixel(i,y,1);
		LCD_PutPixel(i,y+1,1);
		
	}
}
开发者ID:Rost-enTroniX,项目名称:hpks,代码行数:52,代码来源:lcd_display.c


示例19: Display_Init

/**
  * @brief  Display Init (LCD)
  * @param  None
  * @retval None
  */
static void Display_Init(void)
{
  /* Initialize the LCD */
  LCD_Init();
  LCD_LayerInit();
  /* Enable the LTDC */
  LTDC_Cmd(ENABLE);
  
  /* Set LCD Background Layer  */
  LCD_SetLayer(LCD_BACKGROUND_LAYER);
  
  /* Clear the Background Layer */ 
  LCD_Clear(LCD_COLOR_WHITE);
  
  /* Configure the transparency for background */
  LCD_SetTransparency(0);
  
  /* Set LCD Foreground Layer  */
  LCD_SetLayer(LCD_FOREGROUND_LAYER);

  /* Configure the transparency for foreground */
  LCD_SetTransparency(200);
  
  /* Clear the Foreground Layer */ 
  LCD_Clear(LCD_COLOR_WHITE);
  
  /* Set the LCD Back Color and Text Color*/
  LCD_SetBackColor(LCD_COLOR_BLUE);
  LCD_SetTextColor(LCD_COLOR_WHITE);
  
    /* Set the LCD Text size */
  LCD_SetFont(&FONTSIZE);
  
  /* Set the LCD Back Color and Text Color*/
  LCD_SetBackColor(LCD_COLOR_BLUE);
  LCD_SetTextColor(LCD_COLOR_WHITE);
  
  LCD_DisplayStringLine(LINE(LINENUM), (uint8_t*)MESSAGE1);
  LCD_DisplayStringLine(LINE(LINENUM + 1), (uint8_t*)MESSAGE1_1);
  LCD_DisplayStringLine(LINE(0x17), (uint8_t*)"                               ");
  
  /* Set the LCD Text size */
  LCD_SetFont(&Font16x24);
  
  LCD_DisplayStringLine(LCD_LINE_0, (uint8_t*)MESSAGE2);
  LCD_DisplayStringLine(LCD_LINE_1, (uint8_t*)MESSAGE2_1);
  
  /* Set the LCD Back Color and Text Color*/
  LCD_SetBackColor(LCD_COLOR_WHITE);
  LCD_SetTextColor(LCD_COLOR_BLUE); 
}
开发者ID:flv1991,项目名称:STM32_LAMEC_CAN,代码行数:56,代码来源:main.c


示例20: Display_Init

/**
  * @brief  Display Init (LCD)
  * @param  None
  * @retval None
  */
void Display_Init(void)
{

  /* Initialize the LCD */
  LCD_Init();

  /* Display message on LCD ***************************************************/
#if defined (USE_STM324x9I_EVAL) 
  /* Initialize the LCD Layers */
  LCD_LayerInit();
  
  /* Enable The Display */
  LCD_DisplayOn(); 
  /* Set LCD Background Layer  */
  LCD_SetLayer(LCD_BACKGROUND_LAYER);
  /* Clear the Background Layer */ 
  LCD_Clear(LCD_COLOR_WHITE);
  
  /* Set LCD Foreground Layer  */
  LCD_SetLayer(LCD_FOREGROUND_LAYER);

  /* Configure the transparency for foreground */
  LCD_SetTransparency(100);
#endif /* USE_STM324x9I_EVAL */
  
  /* Clear the LCD */
  LCD_Clear(White);

  /* Set the LCD Text size */
  LCD_SetFont(&FONTSIZE);

  /* Set the LCD Back Color and Text Color*/
  LCD_SetBackColor(Blue);
  LCD_SetTextColor(White);

  LCD_DisplayStringLine(LINE(LINENUM), (uint8_t*)MESSAGE1);
  LCD_DisplayStringLine(LINE(0x16), (uint8_t*)"                                        ");
  
  /* Set the LCD Text size */
  LCD_SetFont(&Font16x24);

  LCD_DisplayStringLine(LCD_LINE_0, (uint8_t*)MESSAGE2);

  /* Set the LCD Back Color and Text Color*/
  LCD_SetBackColor(White);
  LCD_SetTextColor(Blue);

  LCD_DisplayStringLine(LCD_LINE_2, (uint8_t*)MESSAGE3);
  LCD_DisplayStringLine(LCD_LINE_4, (uint8_t*)MESSAGE4);
}
开发者ID:EmbolismSoil,项目名称:STM32F407_LINUX,代码行数:55,代码来源:main.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ LCD_UsrLog函数代码示例发布时间:2022-05-30
下一篇:
C++ LCD_SetCursor函数代码示例发布时间: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