Пример #1
0
/**
  * @brief  Main program.
  * @param  None
  * @retval None
  */
void main(void)
{
  uint8_t i = 0;
  
  /* Select fCPU = 16MHz */
  CLK_SYSCLKConfig(CLK_PRESCALER_HSIDIV1);
  
  /* Init the Eval board LCD */
  STM8S_EVAL_LCD_Init();

  /* Clear LCD */
  LCD_Clear();

  LCD_SetCursorPos(LCD_LINE1, 0);
  LCD_Print("SPI-LCD example");		
  
  /* Display "moving" ST logo */
  for (i = 1; i < 8; i++)
  {
    PrintLogo();
    Delay(0xFFFF);
  }
  
  LCD_SetCursorPos(LCD_LINE2, 0);
  LCD_Print("               ");

  LCD_DisplayLogo(0x93);
  Delay(600);
  while(1)
  {}

}
Пример #2
0
/**
  * @brief  Configure the LCD available on the evaluation board
  * @param  None
  * @retval None
  */
static void LCD_Config(void)
{
    /* Init the Eval board LCD */
    STM8S_EVAL_LCD_Init();

    /* Clear LCD */
    LCD_Clear();

    /* Print on LCD line1*/
    LCD_SetCursorPos(LCD_LINE1, 0);
    LCD_Print("Clock Selection");
    /* Print on LCD line2*/
    LCD_SetCursorPos(LCD_LINE2, 0);
    LCD_Print("  Use joystick  ");
}
Пример #3
0
/**
  * @brief  Configure the LCD available on the evaluation board
  * @param  None
  * @retval None
  */
void LCD_Config(void)
{
    /* Init the Eval board LCD */
    STM8S_EVAL_LCD_Init();

    /* Clear LCD */
    LCD_Clear();

    /* Display the welcome text on LCD */
    LCD_SetCursorPos(LCD_LINE1, 0);
    LCD_Print("   STM8S CAN    ");
    /* Print "Press Key" on LCD line2*/
    LCD_SetCursorPos(LCD_LINE2, 0);
    LCD_Print("   Press Key    ");
}