Mercurial > public > ostc4
diff Discovery/Src/ostc.c @ 885:8d3f3a635397 Evo_2_23
Replaced global hardwareDisplay with unit access:
The previous global hardwaredisplay, which indicated the display version, is stored in scope of ostc.c with interface function access.
| author | Ideenmodellierer |
|---|---|
| date | Sun, 01 Sep 2024 21:35:50 +0200 |
| parents | fe955104901c |
| children | 33b91584d827 |
line wrap: on
line diff
--- a/Discovery/Src/ostc.c Sun Sep 01 20:31:01 2024 +0200 +++ b/Discovery/Src/ostc.c Sun Sep 01 21:35:50 2024 +0200 @@ -53,7 +53,7 @@ /* Private variables ---------------------------------------------------------*/ /* Private variables with external access via get_xxx() function -------------*/ - +static uint8_t hardwareDisplay = 0; //< either OSTC4 LCD (=0) or new Screen (=1) /* Private function prototypes -----------------------------------------------*/ /* Exported functions --------------------------------------------------------*/ @@ -422,7 +422,22 @@ HAL_GPIO_Init(RESET_LOGIC_ALLES_OK_GPIO_PORT, &GPIO_InitStruct); #endif } - +void SetDisplayVersion(uint8_t version) +{ + if(version < 2) + { + hardwareDisplay = version; + } +} +uint8_t isNewDisplay() +{ + uint8_t ret = 0; + if(hardwareDisplay == DISPLAY_VERSION_NEW) + { + ret = 1; + } + return ret; +} #ifndef BOOTLOADER_STANDALONE void HAL_UART_ErrorCallback(UART_HandleTypeDef *huart)
