/* Shifts the contents of the frame buffer up the specified number of pixels.  */
void ssd1306ShiftFrameBuffer(uint8_t height)
/* Shifts the contents of the frame buffer up the specified number of pixels.  */
void ssd1306ShiftFrameBuffer(uint8_t height)
{
  uint8_t y, x;
  if (height == 0) return;
  if (height >= SSD1306_LCDHEIGHT)
  {
    ssd1306ClearScreen();
    return;
  }
  for (y = 0; y < SSD1306_LCDHEIGHT; y++)
  {
    for (x = 0; x < SSD1306_LCDWIDTH; x++)
    {
      if ((SSD1306_LCDHEIGHT - 1) - y > height)
      {
        ssd1306GetPixel(x, y + height) ? ssd1306DrawPixel(x, y) : ssd1306ClearPixel(x, y);
      }
      else
      {
        ssd1306ClearPixel(x, y);
      }
    }
  }
}