Refactoring
This commit is contained in:
@@ -187,7 +187,7 @@ void ST7565_Init(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_FEAT_F4HWN
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
void ST7565_Contrast(void)
|
void ST7565_ContrastAndInv(void)
|
||||||
{
|
{
|
||||||
SPI_ToggleMasterMode(&SPI0->CR, false);
|
SPI_ToggleMasterMode(&SPI0->CR, false);
|
||||||
ST7565_WriteByte(ST7565_CMD_SOFTWARE_RESET); // software reset
|
ST7565_WriteByte(ST7565_CMD_SOFTWARE_RESET); // software reset
|
||||||
|
@@ -39,7 +39,7 @@ void ST7565_SelectColumnAndLine(uint8_t Column, uint8_t Line);
|
|||||||
void ST7565_WriteByte(uint8_t Value);
|
void ST7565_WriteByte(uint8_t Value);
|
||||||
|
|
||||||
#ifdef ENABLE_FEAT_F4HWN
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
void ST7565_Contrast(void);
|
void ST7565_ContrastAndInv(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -910,12 +910,12 @@ void UI_DisplayMenu(void)
|
|||||||
case MENU_SET_CTR:
|
case MENU_SET_CTR:
|
||||||
sprintf(String, "%d", gSubMenuSelection);
|
sprintf(String, "%d", gSubMenuSelection);
|
||||||
gSetting_set_ctr = gSubMenuSelection;
|
gSetting_set_ctr = gSubMenuSelection;
|
||||||
ST7565_Contrast();
|
ST7565_ContrastAndInv();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_SET_INV:
|
case MENU_SET_INV:
|
||||||
strcpy(String, gSubMenu_OFF_ON[gSubMenuSelection]);
|
strcpy(String, gSubMenu_OFF_ON[gSubMenuSelection]);
|
||||||
ST7565_Contrast();
|
ST7565_ContrastAndInv();
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -71,7 +71,7 @@ void UI_DisplayWelcome(void)
|
|||||||
UI_PrintString(WelcomeString1, 0, 127, 2, 10);
|
UI_PrintString(WelcomeString1, 0, 127, 2, 10);
|
||||||
|
|
||||||
#ifdef ENABLE_FEAT_F4HWN
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
ST7565_Contrast();
|
ST7565_ContrastAndInv();
|
||||||
UI_PrintStringSmallNormal(Version, 0, 128, 5);
|
UI_PrintStringSmallNormal(Version, 0, 128, 5);
|
||||||
UI_PrintStringSmallNormal(Feat, 0, 128, 6);
|
UI_PrintStringSmallNormal(Feat, 0, 128, 6);
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user