/** * @brief * @param Event: The event that caused the callback * @param ButtonId: The button ID that the event happened on * @retval None */ void guiUart1ParityButtonCallback(GUITouchEvent Event, uint32_t ButtonId) { if (Event == GUITouchEvent_Up) { GUIDisplayState displayState = GUIContainer_GetDisplayState(GUIContainerId_PopoutUart1Parity); if (displayState == GUIDisplayState_Hidden) { GUI_SetActiveLayer(GUILayer_1); GUIButton_SetLayer(GUIButtonId_Uart1Parity, GUILayer_1); GUIButton_SetState(GUIButtonId_Uart1Parity, GUIButtonState_Enabled); GUIContainer_Draw(GUIContainerId_PopoutUart1Parity); } else if (displayState == GUIDisplayState_NotHidden) { GUIContainer_Hide(GUIContainerId_PopoutUart1Parity); GUI_SetActiveLayer(GUILayer_0); GUIButton_SetLayer(GUIButtonId_Uart1Parity, GUILayer_0); GUIButton_SetState(GUIButtonId_Uart1Parity, GUIButtonState_Disabled); /* Refresh the main text box */ guiUart1ManageMainTextBox(true); } } }
/** * @brief * @param None * @retval None */ void lcdChangeDisplayStateOfSidebar(uint32_t SidebarId) { GUIDisplayState displayState = GUIContainer_GetDisplayState(SidebarId); if (displayState == GUIDisplayState_NotHidden) { /* Hide this sidebar and display the last active instead */ GUIContainer_Hide(SidebarId); GUIContainer_Draw(prvIdOfLastActiveSidebar); /* Set the last active as active now */ prvIdOfActiveSidebar = prvIdOfLastActiveSidebar; prvIdOfLastActiveSidebar = GUIContainerId_SidebarEmpty; } else if (displayState == GUIDisplayState_Hidden) { /* Hide the active sidebar and display this sidebar instead */ GUIContainer_Hide(prvIdOfActiveSidebar); GUIContainer_Draw(SidebarId); /* Save the old active sidebar and set this sidebar as the new active one */ prvIdOfLastActiveSidebar = prvIdOfActiveSidebar; prvIdOfActiveSidebar = SidebarId; } if (prvIdOfActiveSidebar != GUIContainerId_SidebarSystem) { prvActiveChannelHasChanged = true; } }
/** * @brief * @param Event: The event that caused the callback * @param ButtonId: The button ID that the event happened on * @retval None */ void guiCan1TopButtonCallback(GUITouchEvent Event, uint32_t ButtonId) { if (Event == GUITouchEvent_Up) { GUIDisplayState displayState = GUIContainer_GetDisplayState(GUIContainerId_SidebarCan1); lcdChangeDisplayStateOfSidebar(GUIContainerId_SidebarCan1); } }
/** * @brief * @param Event: The event that caused the callback * @param ButtonId: The button ID that the event happened on * @retval None */ void guiUart1TopButtonCallback(GUITouchEvent Event, uint32_t ButtonId) { if (Event == GUITouchEvent_Up) { /* Get the current display state of the sidebar */ GUIDisplayState displayState = GUIContainer_GetDisplayState(GUIContainerId_SidebarUart1); /* Change the state of the sidebar */ lcdChangeDisplayStateOfSidebar(GUIContainerId_SidebarUart1); } }