예제 #1
0
/**
  * @brief  LCD demo
  * @param  None
  * @retval None
  */
void LCD_demo(void)
{
  lcd_feature_idx = 0;

  LCD_SetInitialHint();

  LCD_Show_Feature(lcd_feature_idx);
  lcd_feature_idx++;

  while (1)
  {
    if (CheckForUserInput() > 0)
    {
      /* Careful : The last step (LCD_FEAT_NB_MAX) is used to restore LCD DSI normal mode */
      if (lcd_feature_idx <= LCD_FEAT_BASIC_BITMAP)
      //if (lcd_feature_idx <= LCD_FEAT_NB_MAX)
      {
        LCD_Show_Feature(lcd_feature_idx);
        lcd_feature_idx++;
      }
      else
      {
        /* Exit LCD demo once passed the last feature shown */
        return;
      }
    } /* of if (CheckForUserInput() > 0) */

    HAL_Delay(100);
  }
}
예제 #2
0
파일: lcd.c 프로젝트: TheGabbleDuck/Main
/**
  * @brief  LCD demo
  * @param  None
  * @retval None
  */
void LCD_demo(void)
{ 
  LCD_SetHint();
  LCD_Feature = 0;
  LCD_Show_Feature (LCD_Feature); 
  
  while (1)
  { 
    if(CheckForUserInput() > 0)
    {
      if(++LCD_Feature < LCD_FEATURES_NUM)
      {
        LCD_Show_Feature (LCD_Feature); 
      }
      else
      {
        return;
      }
    }
    HAL_Delay(100);
  }
}