This commit is contained in:
olikraus 2016-11-26 18:38:40 +01:00
parent 75b36ae010
commit 105d3ff73d
3 changed files with 16 additions and 5 deletions

View File

@ -56,4 +56,5 @@ https://github.com/olikraus/u8g2 ChangeLog
2016-xx-xx v2.7.x olikraus@gmail.com
* Added support for 0.66" 64x48 SSD1306 OLED (issue 89)
* Support for UC1608 (issue 92)
* Speed improvements for SW SPI und 8080 mode (issues 87 and 95)
* Speed improvements for SW SPI und 8080 mode (issues 87, 90 and 95)
* Fixed issue with ST7920 not using the optimized SW SPI procedures (issue 87)

View File

@ -583,9 +583,15 @@ void u8g2_Setup_a2printer_384x240_f(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x
void u8g2_SendBuffer(u8g2_t *u8g2);
void u8g2_ClearBuffer(u8g2_t *u8g2);
void u8g2_SetBufferCurrTileRow(u8g2_t *u8g2, uint8_t row) U8G2_NOINLINE;
void u8g2_FirstPage(u8g2_t *u8g2);
uint8_t u8g2_NextPage(u8g2_t *u8g2);
#define u8g2_GetBufferPtr(u8g2) ((u8g2)->u8g2->tile_buf_ptr)
#define u8g2_GetBufferTileHeight(u8g2) ((u8g2)->->tile_buf_height)
#define u8g2_GetBufferTileWidth(u8g2) (u8g2_GetU8x8(u8g2)->display_info->tile_width)
/* the following variable is only valid after calling u8g2_FirstPage */
#define u8g2_GetBufferCurrTileRow(u8g2) ((u8g2)->tile_curr_row)
/*==========================================*/
/* u8g2_ll_hvline.c */

View File

@ -84,11 +84,16 @@ void u8g2_SendBuffer(u8g2_t *u8g2)
}
/*============================================*/
void u8g2_SetBufferCurrTileRow(u8g2_t *u8g2, uint8_t row)
{
u8g2->tile_curr_row = row;
u8g2->cb->update(u8g2);
}
void u8g2_FirstPage(u8g2_t *u8g2)
{
u8g2_ClearBuffer(u8g2);
u8g2->tile_curr_row = 0;
u8g2->cb->update(u8g2);
u8g2_SetBufferCurrTileRow(u8g2, 0);
}
uint8_t u8g2_NextPage(u8g2_t *u8g2)
@ -100,7 +105,6 @@ uint8_t u8g2_NextPage(u8g2_t *u8g2)
if ( row >= u8g2_GetU8x8(u8g2)->display_info->tile_height )
return 0;
u8g2_ClearBuffer(u8g2);
u8g2->tile_curr_row = row;
u8g2->cb->update(u8g2);
u8g2_SetBufferCurrTileRow(u8g2, row);
return 1;
}