This commit is contained in:
olikraus 2016-01-03 18:30:19 +01:00
parent d108af04fa
commit bfb14dd948
2 changed files with 13 additions and 13 deletions

View File

@ -73,7 +73,8 @@ static void u8g2_update_dimension_common(u8g2_t *u8g2)
t *= 8;
u8g2->pixel_buf_height = t;
t = u8g2_GetU8x8(u8g2)->display_info->pixel_width;
t = u8g2_GetU8x8(u8g2)->display_info->tile_width;
t *= 8;
u8g2->pixel_buf_width = t;
t = u8g2->tile_curr_row;
@ -90,9 +91,8 @@ static void u8g2_update_dimension_common(u8g2_t *u8g2)
u8g2->buf_y1 = u8g2->buf_y0;
u8g2->buf_y1 += t;
u8g2->width = u8g2->pixel_buf_width;
t = u8g2_GetU8x8(u8g2)->display_info->pixel_height;
u8g2->height = t;
u8g2->width = u8g2_GetU8x8(u8g2)->display_info->pixel_width;
u8g2->height = u8g2_GetU8x8(u8g2)->display_info->pixel_height;
}
void u8g2_update_dimension_r0(u8g2_t *u8g2)
@ -113,9 +113,9 @@ void u8g2_update_dimension_r1(u8g2_t *u8g2)
{
u8g2_update_dimension_common(u8g2);
u8g2->width = u8g2->height;
u8g2->height = u8g2->pixel_buf_width;
u8g2->height = u8g2_GetU8x8(u8g2)->display_info->pixel_width;
u8g2->width = u8g2_GetU8x8(u8g2)->display_info->pixel_height;
u8g2->user_x0 = u8g2->buf_y0;
u8g2->user_x1 = u8g2->buf_y1;
@ -144,11 +144,11 @@ void u8g2_update_dimension_r3(u8g2_t *u8g2)
{
u8g2_update_dimension_common(u8g2);
u8g2->width = u8g2->height;
u8g2->height = u8g2->pixel_buf_width;
u8g2->height = u8g2_GetU8x8(u8g2)->display_info->pixel_width;
u8g2->width = u8g2_GetU8x8(u8g2)->display_info->pixel_height;
u8g2->user_x0 = u8g2->height - u8g2->buf_y1;
u8g2->user_x1 = u8g2->height - u8g2->buf_y0;
u8g2->user_x0 = u8g2->width - u8g2->buf_y1;
u8g2->user_x1 = u8g2->width - u8g2->buf_y0;
u8g2->user_y0 = 0;
u8g2->user_y1 = u8g2->pixel_buf_width;
@ -204,7 +204,7 @@ void u8g2_draw_l90_r3(u8g2_t *u8g2, u8g2_uint_t x, u8g2_uint_t y, u8g2_uint_t le
xx = y;
yy = u8g2->height;
yy = u8g2->width;
yy -= x;
yy--;

View File

@ -52,7 +52,7 @@
//U8G2_SSD1306_128X64_NONAME_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* reset=*/ 8);
//U8G2_SSD1306_128X64_NONAME_1_6800 u8g2(U8G2_R0, 13, 11, 2, 3, 4, 5, 6, A4, /*enable=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8);
//U8G2_SSD1306_128X64_NONAME_1_8080 u8g2(U8G2_R0, 13, 11, 2, 3, 4, 5, 6, A4, /*enable=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8);
U8G2_UC1701_DOGS102_1_4W_SW_SPI u8g2(U8G2_R2, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
U8G2_UC1701_DOGS102_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_UC1701_DOGS102_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//#define MINI_LOGO