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

C++ LCD_ClearLine函数代码示例

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

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



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


示例16: 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))
  {
    /* Set the LCD Back Color */
    LCD_SetBackColor(White);
    
    /* Clear the LCD line 2 */
    LCD_ClearLine(Line2);
   
    /* Disable the RTC Clock */
    RCC_RTCCLKCmd(DISABLE);
   
    /* Reset Counter*/
    uwRTCAlarmCount = 0;
    
    /* Disable the alarm */
    RTC_AlarmCmd(RTC_Alarm_A, DISABLE);
    
    /* Set the LCD Back Color */
    LCD_SetBackColor(White);
  
    /* Display a Full rectangle on the LCD */
    LCD_DrawFullRect(80, 290,240, 25 );
    
    /* Set LCD text color */
    LCD_SetTextColor(Red);

    /* Display rectangle on the LCD */
    LCD_DrawRect(80, 290, 25, 240 );
    
    /* Clear the WAKEUP EXTI  pending bit */
    EXTI_ClearITPendingBit(WAKEUP_BUTTON_EXTI_LINE);  
  }

}
开发者ID:JackABK,项目名称:STM32_FreeRTOS8.0.1,代码行数:41,代码来源:stm32f4xx_it.c


示例17: Time_Display

/**
  * @brief  Displays the current time.
  * @param  None
  * @retval None
  */
void Time_Display(void)
{
  /* Clear Line13 */
  LCD_ClearLine(LCD_LINE_13);

  /* Display time separators ":" on Line4 */
  LCD_DisplayChar(LCD_LINE_13, 212, ':');
  LCD_DisplayChar(LCD_LINE_13, 166, ':');

  /* Get the current Time */
  RTC_GetTime(RTC_Format_BIN, &RTC_TimeStructure);

  /* Display time hours */
  LCD_DisplayChar(LCD_LINE_13, 244,((RTC_TimeStructure.RTC_Hours / 10) + 0x30));
  LCD_DisplayChar(LCD_LINE_13, 228,((RTC_TimeStructure.RTC_Hours % 10) + 0x30));

  /* Display time minutes */
  LCD_DisplayChar(LCD_LINE_13, 196,((RTC_TimeStructure.RTC_Minutes /10) + 0x30));
  LCD_DisplayChar(LCD_LINE_13, 182,((RTC_TimeStructure.RTC_Minutes % 10) + 0x30));

  /* Display time seconds */
  LCD_DisplayChar(LCD_LINE_13, 150,((RTC_TimeStructure.RTC_Seconds / 10) + 0x30));
  LCD_DisplayChar(LCD_LINE_13, 134,((RTC_TimeStructure.RTC_Seconds % 10) + 0x30));
}
开发者ID:szymon2103,项目名称:Stm32,代码行数:29,代码来源:main.c


示例18: WriteChar

void WriteChar(register Console * C, char c)
{
    int loopx, loopy;

    if (c == '\f') {
	C->xpos = 0;
	C->ypos = 0;

#ifdef CONFIG_SIBO_VIRTUAL_CONSOLE

	if (Visible == &Con[Current_VCminor])
#endif

	    LCD_Position(C->xpos, C->ypos);

	for (loopy = 0; loopy < HEIGHT; loopy++) {

#ifdef CONFIG_SIBO_VIRTUAL_CONSOLE

	    for (loopx = 0; loopx < WIDTH; loopx++)
		C->screen[loopy][loopx] = ' ';

	    if (Visible == &Con[Current_VCminor])
#endif

		LCD_ClearLine(loopy);
	}
	return;
    }

    switch (c) {

    case '\b':
	if (C->xpos > 0) {
	    C->xpos--;

#ifdef CONFIG_SIBO_VIRTUAL_CONSOLE

	    if (Visible == &Con[Current_VCminor])
#endif

		LCD_Position(C->xpos, C->ypos);

	    /* clear the character */
	    WriteChar(C, ' ');

	    /* and move back again */
	    C->xpos--;

#ifdef CONFIG_SIBO_VIRTUAL_CONSOLE

	    if (Visible == &Con[Current_VCminor])
#endif

		LCD_Position(C->xpos, C->ypos);
	}
	return;

    case '\r':

#ifdef CONFIG_SIBO_CONSOLE_ECHO

	send_byte('\n');

#endif

	C->xpos = 0;

#ifdef CONFIG_SIBO_VIRTUAL_CONSOLE

	if (Visible == &Con[Current_VCminor])
#endif

	    LCD_Position(C->xpos, C->ypos);

	return;

    case '\n':

#ifdef CONFIG_SIBO_CONSOLE_ECHO

	send_byte('\n');

#endif

	C->ypos++;

#ifdef CONFIG_SIBO_VIRTUAL_CONSOLE

	if (Visible == &Con[Current_VCminor])
#endif
	    LCD_Position(C->xpos, C->ypos);

	if (C->ypos == HEIGHT) {
	    C->ypos--;

#ifdef CONFIG_SIBO_VIRTUAL_CONSOLE

	    for (loopy = 0; loopy < HEIGHT - 1; loopy++)
		for (loopx = 0; loopx < WIDTH; loopx++)
//.........这里部分代码省略.........
开发者ID:lkundrak,项目名称:elks,代码行数:101,代码来源:sibo_con.c


示例19: LwIP_DHCP_Process_Handle

/**
* @brief  LwIP_DHCP_Process_Handle
* @param  None
* @retval None
*/
void LwIP_DHCP_Process_Handle()
{
  struct ip_addr ipaddr;
  struct ip_addr netmask;
  struct ip_addr gw;
  uint8_t iptab[4] = {0};
  uint8_t iptxt[20];
  
  switch (DHCP_state)
  {
  case DHCP_START:
    {
      DHCP_state = DHCP_WAIT_ADDRESS;
      dhcp_start(&gnetif);
      /* IP address should be set to 0 
         every time we want to assign a new DHCP address */
      IPaddress = 0;
#ifdef USE_LCD
      LCD_DisplayStringLine(Line4, (uint8_t*)"     Looking for    ");
      LCD_DisplayStringLine(Line5, (uint8_t*)"     DHCP server    ");
      LCD_DisplayStringLine(Line6, (uint8_t*)"     please wait... ");
#endif
    }
    break;

  case DHCP_WAIT_ADDRESS:
    {
      /* Read the new IP address */
      IPaddress = gnetif.ip_addr.addr;
      
      if (IPaddress!=0) 
      {
        DHCP_state = DHCP_ADDRESS_ASSIGNED;	
        
        /* Stop DHCP */
        dhcp_stop(&gnetif);

#ifdef USE_LCD      
        iptab[0] = (uint8_t)(IPaddress >> 24);
        iptab[1] = (uint8_t)(IPaddress >> 16);
        iptab[2] = (uint8_t)(IPaddress >> 8);
        iptab[3] = (uint8_t)(IPaddress);

        sprintf((char*)iptxt, " %d.%d.%d.%d", iptab[3], iptab[2], iptab[1], iptab[0]);       

        LCD_ClearLine(Line4);
        LCD_ClearLine(Line5);
        LCD_ClearLine(Line6);

        /* Display the IP address */
        LCD_DisplayStringLine(Line7, (uint8_t*)"IP address assigned ");
        LCD_DisplayStringLine(Line8, (uint8_t*)"  by a DHCP server  ");
        LCD_DisplayStringLine(Line9, iptxt);
#endif
        STM_EVAL_LEDOn(LED1);
      }
      else
      {
        /* DHCP timeout */
        if (gnetif.dhcp->tries > MAX_DHCP_TRIES)
        {
          DHCP_state = DHCP_TIMEOUT;

          /* Stop DHCP */
          dhcp_stop(&gnetif);

          /* Static address used */
          IP4_ADDR(&ipaddr, IP_ADDR0 ,IP_ADDR1 , IP_ADDR2 , IP_ADDR3 );
          IP4_ADDR(&netmask, NETMASK_ADDR0, NETMASK_ADDR1, NETMASK_ADDR2, NETMASK_ADDR3);
          IP4_ADDR(&gw, GW_ADDR0, GW_ADDR1, GW_ADDR2, GW_ADDR3);
          netif_set_addr(&gnetif, &ipaddr , &netmask, &gw);

#ifdef USE_LCD   
          LCD_DisplayStringLine(Line7, (uint8_t*)"    DHCP timeout    ");

          iptab[0] = IP_ADDR3;
          iptab[1] = IP_ADDR2;
          iptab[2] = IP_ADDR1;
          iptab[3] = IP_ADDR0;

          sprintf((char*)iptxt, "  %d.%d.%d.%d", iptab[3], iptab[2], iptab[1], iptab[0]);

          LCD_ClearLine(Line4);
          LCD_ClearLine(Line5);
          LCD_ClearLine(Line6);

          LCD_DisplayStringLine(Line8, (uint8_t*)"  Static IP address   ");
          LCD_DisplayStringLine(Line9, iptxt);         
#endif
          STM_EVAL_LEDOn(LED1);
        }
      }
    }
开发者ID:jdaheron,项目名称:BLDR,代码行数:98,代码来源:netconf.c


示例20: main

/**
  * @brief  Main program
  * @param  None
  * @retval None
  */
int main(void)
{
  /*!< At this stage the microcontroller clock setting is already configured,
       this is done through SystemInit() function which is called from startup
       files (startup_stm32f40_41xxx.s/startup_stm32f427_437xx.s/startup_stm32f429_439xx.s)
       before to branch to application main.
     */

  /* SysTick end of count event each 10ms */
  RCC_GetClocksFreq(&RCC_Clocks);
  SysTick_Config(RCC_Clocks.HCLK_Frequency / 100);

  /* Initialize LEDs mounted on EVAL board */
  STM_EVAL_LEDInit(LED1);
  STM_EVAL_LEDInit(LED2);
  STM_EVAL_LEDInit(LED3);
  STM_EVAL_LEDInit(LED4);

  STM_EVAL_LEDOn(LED1);

 /* Initialize the LCD */
  LCD_Init();
  LCD_Clear(Black);
  LCD_SetTextColor(White);

  LCD_LOG_SetHeader((uint8_t*)"STM32 Camera Demo");
  LCD_LOG_SetFooter ((uint8_t*)"   Copyright (c) STMicroelectronics" );

  /* ADC configuration */
  ADC_Config();

  /* Initializes the DCMI interface (I2C and GPIO) used to configure the camera */
  OV2640_HW_Init();

  /* Read the OV9655/OV2640 Manufacturer identifier */
  OV9655_ReadID(&OV9655_Camera_ID);
  OV2640_ReadID(&OV2640_Camera_ID);

  if(OV9655_Camera_ID.PID  == 0x96)
  {
    Camera = OV9655_CAMERA;
    sprintf((char*)abuffer, "OV9655 Camera ID 0x%x", OV9655_Camera_ID.PID);
    ValueMax = 2;
  }
  else if(OV2640_Camera_ID.PIDH  == 0x26)
  {
    Camera = OV2640_CAMERA;
    sprintf((char*)abuffer, "OV2640 Camera ID 0x%x", OV2640_Camera_ID.PIDH);
    ValueMax = 2;
  }
  else
  {
    LCD_SetTextColor(LCD_COLOR_RED);
    LCD_DisplayStringLine(LINE(4), (uint8_t*)"Check the Camera HW and try again");
    while(1);
  }

  LCD_SetTextColor(LCD_COLOR_YELLOW);
  LCD_DisplayStringLine(LINE(4), (uint8_t*)abuffer);
  LCD_SetTextColor(LCD_COLOR_WHITE);
  Delay(200);

  /* Initialize demo */
  ImageFormat = (ImageFormat_TypeDef)Demo_Init();

  /* Configure the Camera module mounted on STM324xG-EVAL/STM324x7I-EVAL boards */
  Demo_LCD_Clear();
  LCD_DisplayStringLine(LINE(4), (uint8_t*)"Camera Init..               ");
  Camera_Config();

  sprintf((char*)abuffer, " Image selected: %s", ImageForematArray[ImageFormat]);
  LCD_DisplayStringLine(LINE(4),(uint8_t*)abuffer);

  /* Enable DMA2 stream 1 and DCMI interface then start image capture */
  DMA_Cmd(DMA2_Stream1, ENABLE);
  DCMI_Cmd(ENABLE);

  /* Insert 100ms delay: wait 100ms */
  Delay(200);

  DCMI_CaptureCmd(ENABLE);

  LCD_ClearLine(LINE(4));
  Demo_LCD_Clear();

  if(ImageFormat == BMP_QQVGA)
  {
    /* LCD Display window */
    LCD_SetDisplayWindow(179, 239, 120, 160);
    LCD_WriteReg(LCD_REG_3, 0x1038);
    LCD_WriteRAM_Prepare();
  }
  else if(ImageFormat == BMP_QVGA)
  {
    /* LCD Display window */
//.........这里部分代码省略.........
开发者ID:szymon2103,项目名称:Stm32,代码行数:101,代码来源:main.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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