SetFlipMode and SetPowerSave
This commit is contained in:
parent
33b1babd8a
commit
382c158993
|
@ -62,7 +62,7 @@
|
|||
/* Undefine this to remove u8x8_display_SetContrast function */
|
||||
#define U8X8_WITH_SET_CONTRAST
|
||||
|
||||
/* Undefine this to remove u8x8_display_SetFlipMode function */
|
||||
/* Undefine this to remove u8x8_SetFlipMode function */
|
||||
#define U8X8_WITH_SET_FLIP_MODE
|
||||
|
||||
/* Select 0 or 1 for the default flip mode. This is not affected by U8X8_WITH_FLIP_MODE */
|
||||
|
@ -332,11 +332,11 @@ uint8_t u8x8_display_DrawTile(u8x8_t *u8x8, uint8_t x, uint8_t y, uint8_t cnt, u
|
|||
|
||||
/* setup u8x8 memory structures */
|
||||
void u8x8_SetupMemory(u8x8_t *u8x8);
|
||||
/* Init display, but keep display in power save mode. Usually this command must be followed by u8x8_display_SetPowerSave() */
|
||||
/* Init display, but keep display in power save mode. Usually this command must be followed by u8x8_SetPowerSave() */
|
||||
void u8x8_InitDisplay(u8x8_t *u8x8);
|
||||
/* wake up display from power save mode */
|
||||
void u8x8_display_SetPowerSave(u8x8_t *u8x8, uint8_t is_enable);
|
||||
void u8x8_display_SetFlipMode(u8x8_t *u8x8, uint8_t mode);
|
||||
void u8x8_SetPowerSave(u8x8_t *u8x8, uint8_t is_enable);
|
||||
void u8x8_SetFlipMode(u8x8_t *u8x8, uint8_t mode);
|
||||
void u8x8_display_SetContrast(u8x8_t *u8x8, uint8_t value);
|
||||
void u8x8_display_ClearScreen(u8x8_t *u8x8);
|
||||
|
||||
|
|
|
@ -70,12 +70,12 @@ void u8x8_InitDisplay(u8x8_t *u8x8)
|
|||
u8x8->display_cb(u8x8, U8X8_MSG_DISPLAY_INIT, 0, NULL);
|
||||
}
|
||||
|
||||
void u8x8_display_SetPowerSave(u8x8_t *u8x8, uint8_t is_enable)
|
||||
void u8x8_SetPowerSave(u8x8_t *u8x8, uint8_t is_enable)
|
||||
{
|
||||
u8x8->display_cb(u8x8, U8X8_MSG_DISPLAY_SET_POWER_SAVE, is_enable, NULL);
|
||||
}
|
||||
|
||||
void u8x8_display_SetFlipMode(u8x8_t *u8x8, uint8_t mode)
|
||||
void u8x8_SetFlipMode(u8x8_t *u8x8, uint8_t mode)
|
||||
{
|
||||
u8x8->display_cb(u8x8, U8X8_MSG_DISPLAY_SET_FLIP_MODE, mode, NULL);
|
||||
}
|
||||
|
|
|
@ -328,14 +328,14 @@ void setup(void)
|
|||
void loop(void)
|
||||
{
|
||||
u8x8_InitDisplay(&u8x8);
|
||||
//u8x8_display_SetFlipMode(&u8x8, 1);
|
||||
//u8x8_SetFlipMode(&u8x8, 1);
|
||||
|
||||
//digitalWrite(9, 0); // default output in I2C mode for the SSD1306 test shield: set the i2c adr to 0
|
||||
|
||||
for(;;)
|
||||
{
|
||||
u8x8_display_ClearScreen(&u8x8);
|
||||
u8x8_display_SetPowerSave(&u8x8, 0);
|
||||
u8x8_SetPowerSave(&u8x8, 0);
|
||||
//u8x8_display_SetContrast(&u8x8, 10);
|
||||
|
||||
//delay(500);
|
||||
|
|
|
@ -147,13 +147,13 @@ void setup(void)
|
|||
void loop(void)
|
||||
{
|
||||
u8x8_InitDisplay(&u8g2);
|
||||
//u8x8_display_SetFlipMode(&u8g2, 1);
|
||||
//u8x8_SetFlipMode(&u8g2, 1);
|
||||
|
||||
|
||||
for(;;)
|
||||
{
|
||||
u8x8_display_ClearScreen(&u8g2);
|
||||
u8x8_display_SetPowerSave(&u8g2, 0);
|
||||
u8x8_SetPowerSave(&u8g2, 0);
|
||||
//u8x8_display_SetContrast(&u8g2, 10);
|
||||
|
||||
delay(500);
|
||||
|
|
|
@ -352,7 +352,7 @@ void setup(void)
|
|||
//u8x8_Setup_UC1701_DOGS102(&u8g2);
|
||||
u8g2_Setup_SSD1306_128x64_NONAME_1(&u8g2, &u8g2_cb_r0);
|
||||
u8x8_InitDisplay(u8g2_GetU8x8(&u8g2));
|
||||
u8x8_display_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
|
||||
u8x8_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
|
||||
u8g2_SetFont(&u8g2, u8g2_font_helvB18_tr);
|
||||
}
|
||||
|
||||
|
@ -363,13 +363,13 @@ void loop(void)
|
|||
uint8_t i;
|
||||
|
||||
//u8x8_InitDisplay(&u8g2);
|
||||
//u8x8_display_SetFlipMode(&u8g2, 1);
|
||||
//u8x8_SetFlipMode(&u8g2, 1);
|
||||
|
||||
|
||||
for(;;)
|
||||
{
|
||||
//u8x8_display_ClearScreen(&u8g2);
|
||||
//u8x8_display_SetPowerSave(&u8g2, 0);
|
||||
//u8x8_SetPowerSave(&u8g2, 0);
|
||||
//u8x8_display_SetContrast(&u8g2, 10);
|
||||
|
||||
delay(500);
|
||||
|
|
|
@ -13,7 +13,7 @@ int main(void)
|
|||
|
||||
u8g2_Setup_SDL_128x64_4(&u8g2, &u8g2_cb_r0);
|
||||
u8x8_InitDisplay(u8g2_GetU8x8(&u8g2));
|
||||
u8x8_display_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
|
||||
u8x8_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
|
||||
|
||||
u8g2_SetFont(&u8g2, u8g2_font_helvB18_tn);
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ int main(void)
|
|||
u8g2_Setup_SDL_128x64(&u8g2, &u8g2_cb_r0);
|
||||
|
||||
u8x8_InitDisplay(u8g2_GetU8x8(&u8g2));
|
||||
u8x8_display_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
|
||||
u8x8_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
|
||||
|
||||
|
||||
u8g2_DrawHVLine(&u8g2, 5, 20, 40, 0);
|
||||
|
|
|
@ -13,7 +13,7 @@ int main(void)
|
|||
|
||||
u8g2_Setup_SDL_128x64_4(&u8g2, &u8g2_cb_r0);
|
||||
u8x8_InitDisplay(u8g2_GetU8x8(&u8g2));
|
||||
u8x8_display_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
|
||||
u8x8_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
|
||||
u8g2_SetFont(&u8g2, u8g2_font_helvB18_tr);
|
||||
|
||||
x = 50;
|
||||
|
|
|
@ -204,7 +204,7 @@ int main(void)
|
|||
|
||||
u8g2_Setup_SDL_128x64(&u8g2, &u8g2_cb_r0);
|
||||
u8x8_InitDisplay(u8g2_GetU8x8(&u8g2));
|
||||
u8x8_display_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
|
||||
u8x8_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
|
||||
u8g2_SetFont(&u8g2, u8g2_font_helvB18_tr);
|
||||
|
||||
x = 50;
|
||||
|
|
|
@ -13,7 +13,7 @@ int main(void)
|
|||
|
||||
u8g2_Setup_SDL_128x64_4(&u8g2, &u8g2_cb_r0);
|
||||
u8x8_InitDisplay(u8g2_GetU8x8(&u8g2));
|
||||
u8x8_display_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
|
||||
u8x8_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
|
||||
|
||||
u8g2_SetFont(&u8g2, u8g2_font_helvB18_tr);
|
||||
|
||||
|
|
|
@ -298,7 +298,7 @@ int main(void)
|
|||
|
||||
u8g2_Setup_SDL_128x64_4(&u8g2, &u8g2_cb_r0);
|
||||
u8x8_InitDisplay(u8g2_GetU8x8(&u8g2));
|
||||
u8x8_display_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
|
||||
u8x8_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
|
||||
//u8g2_SetFont(&u8g2, u8g2_font_helvB18_tr);
|
||||
u8g2_SetFont(&u8g2, unifont_greek);
|
||||
|
||||
|
|
|
@ -205,7 +205,7 @@ int main(void)
|
|||
|
||||
u8g2_Setup_TGA_LCD(&u8g2, &u8g2_cb_r0);
|
||||
u8x8_InitDisplay(u8g2_GetU8x8(&u8g2));
|
||||
u8x8_display_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
|
||||
u8x8_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
|
||||
u8g2_SetFont(&u8g2, u8g2_font_helvB18_tr);
|
||||
|
||||
x = 50;
|
||||
|
|
|
@ -58,7 +58,7 @@ int main(void)
|
|||
{
|
||||
u8x8_Setup_TGA_DESC(&u8x8);
|
||||
u8x8_InitDisplay(&u8x8);
|
||||
u8x8_display_SetPowerSave(&u8x8, 0);
|
||||
u8x8_SetPowerSave(&u8x8, 0);
|
||||
|
||||
u8x8_Set8x8Font(&u8x8, bdf_font);
|
||||
u8x8_Draw8x8String(&u8x8, 0, 0, "Hello World!");
|
||||
|
|
|
@ -205,7 +205,7 @@ int main(void)
|
|||
|
||||
u8g2_Setup_TGA_DESC(&u8g2, &u8g2_cb_r0);
|
||||
u8x8_InitDisplay(u8g2_GetU8x8(&u8g2));
|
||||
u8x8_display_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
|
||||
u8x8_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
|
||||
u8g2_SetFont(&u8g2, u8g2_font_helvB18_tr);
|
||||
|
||||
x = 50;
|
||||
|
|
|
@ -666,7 +666,7 @@ void overviewpic(int i, int fm, char *fms, int bm, char *bms, int mm, char *mms)
|
|||
printf("8x8 font overview picture %s\n", target_font_identifier);
|
||||
u8g2_Setup_TGA(&u8g2, &u8g2_cb_r0);
|
||||
u8x8_InitDisplay(u8g2_GetU8x8(&u8g2));
|
||||
u8x8_display_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
|
||||
u8x8_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
|
||||
//u8x8_display_ClearScreen(u8g2_GetU8x8(&u8g2));
|
||||
u8x8_SetFont(u8g2_GetU8x8(&u8g2), u8x8_font_amstrad_cpc_r);
|
||||
u8x8_DrawString(u8g2_GetU8x8(&u8g2), 0, 0, target_font_identifier);
|
||||
|
@ -702,7 +702,7 @@ void overviewpic(int i, int fm, char *fms, int bm, char *bms, int mm, char *mms)
|
|||
printf("overview picture %s\n", target_font_identifier);
|
||||
u8g2_Setup_TGA(&u8g2, &u8g2_cb_r0);
|
||||
u8x8_InitDisplay(u8g2_GetU8x8(&u8g2));
|
||||
u8x8_display_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
|
||||
u8x8_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
|
||||
//u8g2_SetFont(&u8g2, u8g2_font_helvB14_tr);
|
||||
|
||||
|
||||
|
@ -735,7 +735,7 @@ void overviewshortpic(int i, int fm, char *fms, int bm, char *bms, int mm, char
|
|||
printf("8x8 font short overview picture %s\n", target_font_identifier);
|
||||
u8g2_Setup_TGA(&u8g2, &u8g2_cb_r0);
|
||||
u8x8_InitDisplay(u8g2_GetU8x8(&u8g2));
|
||||
u8x8_display_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
|
||||
u8x8_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
|
||||
//u8x8_display_ClearScreen(u8g2_GetU8x8(&u8g2));
|
||||
u8x8_SetFont(u8g2_GetU8x8(&u8g2), u8x8_font_list[u8x8_fnt_cnt]);
|
||||
|
||||
|
@ -758,7 +758,7 @@ void overviewshortpic(int i, int fm, char *fms, int bm, char *bms, int mm, char
|
|||
printf("short overview picture %s\n", target_font_identifier);
|
||||
u8g2_Setup_TGA(&u8g2, &u8g2_cb_r0);
|
||||
u8x8_InitDisplay(u8g2_GetU8x8(&u8g2));
|
||||
u8x8_display_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
|
||||
u8x8_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
|
||||
//u8g2_SetFont(&u8g2, u8g2_font_helvB14_tr);
|
||||
|
||||
u8g2_SetFont(&u8g2, u8g2_font_list[u8g2_fnt_cnt]);
|
||||
|
@ -809,7 +809,7 @@ void generate_font_list(int i, int fm, char *fms, int bm, char *bms, int mm, cha
|
|||
{
|
||||
u8g2_Setup_TGA(&u8g2, &u8g2_cb_r0);
|
||||
u8x8_InitDisplay(u8g2_GetU8x8(&u8g2));
|
||||
u8x8_display_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
|
||||
u8x8_SetPowerSave(u8g2_GetU8x8(&u8g2), 0);
|
||||
if ( u8g2_font_list[u8g2_fnt_cnt] != NULL )
|
||||
{
|
||||
u8g2_SetFont(&u8g2, u8g2_font_list[u8g2_fnt_cnt]);
|
||||
|
|
Loading…
Reference in New Issue