当前位置: 首页>>代码示例>>C++>>正文


C++ LCD_SetFont函数代码示例

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


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


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