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


C++ LCD_ClearLine函数代码示例

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


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

示例1: ILI9341_Show

void ILI9341_Show()
{
	uint8_t tmpreg;
	tmpreg = L3GD20_GetDataStatus();
	/** 
  	* @brief Display String
  	* 		 
  	*/ 

	char str_convert_buffer[16];
	char str_output_buffer[32];

	LCD_DisplayStringLine(LCD_LINE_1, (uint8_t *)"WELCOME TO TKU");
    LCD_DisplayStringLine(LCD_LINE_2, (uint8_t *)"ASFL");

	strcpy(str_output_buffer, "X-AXIS:");
    sprintf(str_convert_buffer, "%d", tmpreg );
    strcat(str_output_buffer, str_convert_buffer); 
    LCD_ClearLine(LCD_LINE_6);
    LCD_DisplayStringLine(LCD_LINE_6, (uint8_t*)str_output_buffer); 

	strcpy(str_output_buffer, "Y-AXIS:");
    sprintf(str_convert_buffer, "%d", 10 );
    strcat(str_output_buffer, str_convert_buffer); 
    LCD_ClearLine(LCD_LINE_7);
    LCD_DisplayStringLine(LCD_LINE_7, (uint8_t*)str_output_buffer); 

   	strcpy(str_output_buffer, "Z-AXIS:");
    sprintf(str_convert_buffer, "%d", 10 );
    strcat(str_output_buffer, str_convert_buffer); 
    LCD_ClearLine(LCD_LINE_8);
    LCD_DisplayStringLine(LCD_LINE_8, (uint8_t*)str_output_buffer); 

}
开发者ID:addischang1991,项目名称:STM32F4Discovery,代码行数:34,代码来源:main.c

示例2: 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

示例3: RegulateMonth

/*******************************************************************************
* Function Name  : RegulateMonth
* Description    : Regulates month.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
static void RegulateMonth(void)
{
  uint32_t tmpValue = 0;
  uint32_t MyKey = 0;

  /* Initialize tmpValue */
  tmpValue = date_s.month;

  /* Endless loop */
  while(1)
  {
    /* Check which key is pressed */
    MyKey = ReadKey();

    /* If "UP" pushbutton is pressed */
    if(MyKey == UP)
    {
      /* Increase the value of the digit */
      if(tmpValue == 12)
      {
        tmpValue = 0;
      }
      LCD_ClearLine(Line3);
      LCD_ClearLine(Line7);
      LCD_ClearLine(Line8);
      Date_Display(date_s.year, ++tmpValue, date_s.day);
    }
    /* If "DOWN" pushbutton is pressed */
    if(MyKey == DOWN)
    {
      /* Decrease the value of the digit */
      if(tmpValue == 1)
      {
        tmpValue = 13;
      }
      LCD_ClearLine(Line3);
      LCD_ClearLine(Line7);
      LCD_ClearLine(Line8);     
      /* Display new value */
      Date_Display(date_s.year, --tmpValue, date_s.day);
    }
    /* If "SEL" pushbutton is pressed */
    if(MyKey == SEL)
    {
      LCD_ClearLine(Line3);
      LCD_ClearLine(Line7);
      LCD_ClearLine(Line8);     
      /* Display new value */
      Date_Display(date_s.year, tmpValue, date_s.day);
      /* Return the digit value and exit */
      date_s.month = tmpValue;
      return;
    }
  }
}
开发者ID:freemanqiu,项目名称:STM3210E_Demo,代码行数:62,代码来源:calendar.c

示例4: EXTI15_10_IRQHandler

/**
  * @brief  This function handles External lines 15 to 10 interrupt request.
  * @param  None
  * @retval None
  */
void EXTI15_10_IRQHandler(void)
{
  /* TimeStamp Event detected */
  if(EXTI_GetITStatus(TAMPER_BUTTON_EXTI_LINE) != RESET)
  {
    count++;
    
    /* Turn on LED2 and off LED1 */
    STM_EVAL_LEDOn(LED2);
    STM_EVAL_LEDOff(LED1);
    
    /* LCD display */
    LCD_ClearLine(LCD_LINE_2);
    LCD_DisplayStringLine(LCD_LINE_3,(uint8_t *) "TimeStamp Event Occurred      " );
    
    /* Display the TimeStamp */
    RTC_TimeStampShow();
    
    /* Display the date */
    RTC_DateShow();
    
    /* Display the Time */
    RTC_TimeShow();
    
    /* Clear the TAMPER Button EXTI line pending bit */
    EXTI_ClearITPendingBit(TAMPER_BUTTON_EXTI_LINE); 
  }
}
开发者ID:BlockWorksCo,项目名称:Platform,代码行数:33,代码来源:stm32f4xx_it.c

示例5: Date_Display

/**
  * @brief  Displays the current date.
  * @param  None
  * @retval None
  */
void Date_Display(void)
{
  /* Clear Line16 */
  LCD_ClearLine(LCD_LINE_16);

  /* Display time separators "/" on Line14 */
  LCD_DisplayChar(LCD_LINE_16, 260, '/');
  LCD_DisplayChar(LCD_LINE_16, 212, '/');
  LCD_DisplayChar(LCD_LINE_16, 166, '/');

  /* Get the current Date */
  RTC_GetDate(RTC_Format_BIN, &RTC_DateStructure);

  /* Display Date WeekDay */
  LCD_DisplayChar(LCD_LINE_16, 276,((RTC_DateStructure.RTC_WeekDay) + 0x30));

  /* Display Date Day */
  LCD_DisplayChar(LCD_LINE_16, 244,((RTC_DateStructure.RTC_Date /10) + 0x30));
  LCD_DisplayChar(LCD_LINE_16, 228,((RTC_DateStructure.RTC_Date % 10) + 0x30));

  /* Display Date Month */
  LCD_DisplayChar(LCD_LINE_16, 196,((RTC_DateStructure.RTC_Month / 10) + 0x30));
  LCD_DisplayChar(LCD_LINE_16, 182,((RTC_DateStructure.RTC_Month % 10) + 0x30));

  /* Display Date Year */
  LCD_DisplayChar(LCD_LINE_16, 150, '2');
  LCD_DisplayChar(LCD_LINE_16, 134, '0');
  LCD_DisplayChar(LCD_LINE_16, 118,((RTC_DateStructure.RTC_Year / 10) + 0x30));
  LCD_DisplayChar(LCD_LINE_16, 102,((RTC_DateStructure.RTC_Year % 10) + 0x30));
}
开发者ID:szymon2103,项目名称:Stm32,代码行数:35,代码来源:main.c

示例6: Demo_LCD_Clear

/**
  * @brief  Clear LCD screen.
  * @param  None
  * @retval None
  */
void Demo_LCD_Clear(void)
{
  uint32_t j;
  for( j= 5; j < 19; j++ )
  {
    LCD_ClearLine(LINE(j));
  }
}
开发者ID:szymon2103,项目名称:Stm32,代码行数:13,代码来源:camera_api.c

示例7: Mass_Storage_Start

/*******************************************************************************
* Function Name  : Mass_Storage_Start
* Description    : Starts the mass storage demo.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void Mass_Storage_Start (void)
{
  /* Disble the JoyStick interrupts */
  IntExtOnOffConfig(DISABLE);

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

  LCD_SetDisplayWindow(160, 223, 128, 128);
 
  LCD_DrawBMP(0x00647C00);

  /* Disable LCD Window mode */
  LCD_WindowModeDisable();
  
  /* Set the Back Color */
  LCD_SetBackColor(Blue);
  /* Set the Text Color */
  LCD_SetTextColor(White); 

  if(MSD_Init() != 0x00)
  {
    LCD_DisplayStringLine(Line8, " No MSD Card Present");
    LCD_DisplayStringLine(Line9, "  To exit Press SEL ");

    /* Loop until SEL key pressed */
    while(ReadKey() != SEL)
    {
    }
  }
  else
  {
    Get_Medium_Characteristics();

    /* Display the "  Plug the USB   " message */
    LCD_DisplayStringLine(Line8, " Plug the USB Cable ");
    LCD_DisplayStringLine(Line9, "Exit:  Push JoyStick");
    
    /* Intialize the USB cell */
    USB_Init();
  
    LCD_ClearLine(Line9);
    /* Display the "To stop Press SEL" message */
    LCD_DisplayStringLine(Line8, "  To stop Press SEL ");

    /* Loop until SEL key pressed */
    while(ReadKey() != SEL)
    {
    }

    PowerOff();
  }
  LCD_Clear(White);
  DisplayMenu();
  IntExtOnOffConfig(ENABLE);
  /* Flush SPI1 Data Register */
  SPI_I2S_ReceiveData(SPI1);
}
开发者ID:siriusJinwooChoi,项目名称:Microprocessor-Project,代码行数:65,代码来源:mass_storage.c

示例8: 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; 
  uint8_t  *ptr = Title;
  uint8_t  tmp[27];
  
  /* center the header */
  while (*ptr++) size ++ ;

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

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

  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:glockwork,项目名称:WirelessAmmeterRepeater,代码行数:48,代码来源:lcd_log.c

示例9: printLCDMaintenanceMenu

void printLCDMaintenanceMenu(){//done
	LCD_TurnOnDisplay();
	LCD_Goto(0,0);LCD_WriteString("1-Set doorcode");
	LCD_Goto(0,1);LCD_WriteString("2-Set admincode");
	LCD_Goto(0,2);LCD_WriteString("3-Set clock");
	LCD_Goto(0,3);LCD_WriteString("4-Set calendar");
	LCD_Goto(0,4);LCD_WriteString("5-View history");
	LCD_Goto(0,5);LCD_WriteString("A-Leave        ");
	LCD_ClearLine(7);
	LCD_BL_State(1);
}
开发者ID:jpedroduarte,项目名称:SE2,代码行数:11,代码来源:Utils.c

示例10: LCD_LOG_ClearTextZone

/**
* @brief  Clear the Text Zone 
* @param  None 
* @retval None
*/
void LCD_LOG_ClearTextZone(void)
{
  uint8_t i=0;
  sFONT *cFont = LCD_GetFont();
  
  for (i= 0 ; i < YWINDOW_SIZE; i++)
  {
    LCD_ClearLine((i + YWINDOW_MIN) * cFont->Height);
  }
  
  LCD_LOG_DeInit();
}
开发者ID:glockwork,项目名称:WirelessAmmeterRepeater,代码行数:17,代码来源:lcd_log.c

示例11: EXTI0_IRQHandler

/**
  * @brief  This function handles External line 0 interrupt request.
  * @param  None
  * @retval None
  */
void EXTI0_IRQHandler(void)
{
  /* Clear the TimeStamp registers */
  if(EXTI_GetITStatus(WAKEUP_BUTTON_EXTI_LINE) != RESET)
  {
    /* Clear the Wakeup Button EXTI line pending bit */
    EXTI_ClearITPendingBit(WAKEUP_BUTTON_EXTI_LINE);
    
    /* Turn LED1 ON and LED2 OFF */
    STM_EVAL_LEDOn(LED1);
    STM_EVAL_LEDOff(LED2);
    
    /* Clear The TSF Flag (Clear TimeStamp Registers) */
    RTC_ClearFlag(RTC_FLAG_TSF);
    LCD_ClearLine(LCD_LINE_2);
    LCD_ClearLine(LCD_LINE_3);
    LCD_ClearLine(LCD_LINE_8);
    LCD_ClearLine(LCD_LINE_9);
    LCD_ClearLine(LCD_LINE_10);
    LCD_DisplayStringLine(LCD_LINE_3,(uint8_t *) "TimeStamp Event Cleared        " );
    
  }
}
开发者ID:BlockWorksCo,项目名称:Platform,代码行数:28,代码来源:stm32f4xx_it.c

示例12: timestuff

void timestuff(void)
{
	systick_count++;
	output.str(std::string());
	mytimerobject.setMin(systick_count/100/60);
	mytimerobject.setSec(systick_count/100);
	mytimerobject.setHun(systick_count/1);
	output << "Time " << mytimerobject.printtime();
	outputstring = "";
	outputstring = output.str();
	chararray = "";
	chararray = outputstring.c_str();
	LCD_DisplayStringLine(LCD_LINE_3,(uint8_t*) chararray);
	LCD_ClearLine(LCD_LINE_4);
}
开发者ID:Alexander-Wilms,项目名称:STM32F429I-DISCO,代码行数:15,代码来源:main.cpp

示例13: Alarm_PreAdjust

/*******************************************************************************
* Function Name  : Alarm_PreAdjust
* Description    : Configures an alarm event to occurs within the current day.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void Alarm_PreAdjust(void)
{
  uint32_t tmp = 0;

  /* Set the LCD Back Color */
  LCD_SetBackColor(Blue);

  /* Set the LCD Text Color */
  LCD_SetTextColor(White);

  if(BKP_ReadBackupRegister(BKP_DR1) != 0xA5A5)
  {
    LCD_DisplayStringLine(Line8, "Time not configured ");
    LCD_DisplayStringLine(Line9, "     Press SEL      ");
    while(ReadKey() == NOKEY)
    {
    }
    return;
  }
  /* Read the alarm value stored in the Backup register */
  tmp = BKP_ReadBackupRegister(BKP_DR6);
  tmp |= BKP_ReadBackupRegister(BKP_DR7) << 16;
  
  /* Clear Line8 */
  LCD_ClearLine(Line8);
    
  /* Display time separators ":" on Line4 */
  LCD_DisplayChar(Line8, 212, ':');
  LCD_DisplayChar(Line8, 166, ':');

  /* Display the alarm value */
  Alarm_Display(tmp);
  /* Store new alarm value */
  tmp = Alarm_Regulate();

  /* Wait until last write operation on RTC registers has finished */
  RTC_WaitForLastTask();
  /* Set RTC Alarm register with the new value */
  RTC_SetAlarm(tmp);
  /* Wait until last write operation on RTC registers has finished */
  RTC_WaitForLastTask();  

  /* Save the Alarm value in the Backup register */
  BKP_WriteBackupRegister(BKP_DR6, (tmp & 0x0000FFFF));
  BKP_WriteBackupRegister(BKP_DR7, (tmp >> 16));
}
开发者ID:freemanqiu,项目名称:STM3210E_Demo,代码行数:53,代码来源:calendar.c

示例14: Time_Regulate

/**
  * @brief  Returns the time entered by user, using menu navigation keys.
  * @param  None
  * @retval Current time RTC counter value
  */
void Time_Regulate(void)
{
  uint8_t Tmp_HH = 0, Tmp_MM = 0, Tmp_SS = 0;

  LCD_DisplayStringLine(LCD_LINE_12, "Set time: hh:mm:ss");

  /* Read time hours */
  Tmp_HH = ReadDigit(LCD_LINE_13, 244, (RTC_TimeStructure.RTC_Hours / 10), 0x2, 0x0);

  if(Tmp_HH == 2)
  {
    if((RTC_TimeStructure.RTC_Hours % 10) > 3)
    {
      RTC_TimeStructure.RTC_Hours = 0;
    }
    Tmp_HH = Tmp_HH * 10 + ReadDigit(LCD_LINE_13, 228, (RTC_TimeStructure.RTC_Hours % 10), 0x3, 0x0);
  }
  else
  {
    Tmp_HH = Tmp_HH * 10 + ReadDigit(LCD_LINE_13, 228, (RTC_TimeStructure.RTC_Hours % 10), 0x9, 0x0);
  }
  /* Read time  minutes */
  Tmp_MM = ReadDigit(LCD_LINE_13, 196, (RTC_TimeStructure.RTC_Minutes / 10), 5, 0x0);
  Tmp_MM = Tmp_MM * 10 + ReadDigit(LCD_LINE_13, 182, (RTC_TimeStructure.RTC_Minutes % 10), 0x9, 0x0);

  /* Read time seconds */
  Tmp_SS = ReadDigit(LCD_LINE_13, 150, (RTC_TimeStructure.RTC_Seconds / 10), 5, 0x0);
  Tmp_SS = Tmp_SS * 10 + ReadDigit(LCD_LINE_13, 134, (RTC_TimeStructure.RTC_Seconds % 10), 0x9, 0x0);

  RTC_TimeStructure.RTC_Hours = Tmp_HH;
  RTC_TimeStructure.RTC_Minutes = Tmp_MM;
  RTC_TimeStructure.RTC_Seconds = Tmp_SS;
  RTC_SetTime(RTC_Format_BIN, &RTC_TimeStructure);

  /* Set the Back Color */
  LCD_SetBackColor(LCD_COLOR_BLACK);

  /* Set the Text Color */
  LCD_SetTextColor(LCD_COLOR_WHITE);

  /* Clear Line12 */
  LCD_ClearLine(LCD_LINE_12);
}
开发者ID:szymon2103,项目名称:Stm32,代码行数:48,代码来源:main.c

示例15: EXTI0_IRQHandler

/**
  * @brief  This function handles External line 0 interrupt request.
  * @param  None
  * @retval None
  */
void EXTI0_IRQHandler(void)
{
  if((EXTI_GetITStatus(WAKEUP_BUTTON_EXTI_LINE) != RESET) && (ubStartevent == 0))
  {
    /* Set the LCD Back Color */
    LCD_SetBackColor(White);

    /* Clear the LCD line 5 */
    LCD_ClearLine(Line5);
  
    /* Enable the RTC Clock */
    RCC_RTCCLKCmd(ENABLE);

    /* Wait for RTC APB registers synchronisation */
    RTC_WaitForSynchro();

    /* start count */
    ubStartevent = 1;
  }
  /* Clear the Wakeup EXTI pending bit */
  EXTI_ClearITPendingBit(WAKEUP_BUTTON_EXTI_LINE);  
}  
开发者ID:XDeca,项目名称:LED_POV,代码行数:27,代码来源:stm32f4xx_it.c


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