/* LCD scrolls a text over the display, sort of "polled printf".  */
void LCD_ScrollText(LCD_TypeDef *lcd, char *scrolltext)
/* LCD scrolls a text over the display, sort of "polled printf".  */
void LCD_ScrollText(LCD_TypeDef *lcd, char *scrolltext)
{
  int  i, len;
  char buffer[8];
  buffer[7] = 0x00;
  len       = strlen(scrolltext);
  if (len < 7) return;
  for (i = 0; i < (len - 7); i++)
  {
    memcpy(buffer, scrolltext + i, 7);
    LCD_Write(lcd, buffer);
    vTaskDelay(100/portTICK_RATE_MS);
  }
}