comparison Discovery/Src/base.c @ 108:f561c79b0546 FlipDisplay

Flip key assigment if needed
author Ideenmodellierer
date Tue, 01 Jan 2019 21:00:13 +0100
parents 5f11787b4f42
children 3834b6272ee5
comparison
equal deleted inserted replaced
107:926098fb116a 108:f561c79b0546
779 if(!GPIO_Pin) 779 if(!GPIO_Pin)
780 return; 780 return;
781 781
782 uint8_t action = 0; 782 uint8_t action = 0;
783 SStateList status; 783 SStateList status;
784 SSettings* pSettings;
785 pSettings = settingsGetPointer();
784 786
785 if(GPIO_Pin == VSYNC_IRQ_PIN) // rechts, unten 787 if(GPIO_Pin == VSYNC_IRQ_PIN) // rechts, unten
786 { 788 {
787 GFX_change_LTDC(); 789 GFX_change_LTDC();
788 housekeepingFrame(); 790 housekeepingFrame();
814 816
815 if(GFX_logoStatus() != 0) 817 if(GFX_logoStatus() != 0)
816 return; 818 return;
817 819
818 if(GPIO_Pin == BUTTON_BACK_PIN) // links 820 if(GPIO_Pin == BUTTON_BACK_PIN) // links
819 action = ACTION_BUTTON_BACK; 821 {
822 if(!pSettings->FlipDisplay)
823 {
824 action = ACTION_BUTTON_BACK;
825 }
826 else
827 {
828 action = ACTION_BUTTON_NEXT;
829 }
830 }
820 else 831 else
821 if(GPIO_Pin == BUTTON_ENTER_PIN) // mitte 832 {
822 action = ACTION_BUTTON_ENTER; 833 if(GPIO_Pin == BUTTON_ENTER_PIN) // mitte
823 else 834 action = ACTION_BUTTON_ENTER;
824 if(GPIO_Pin == BUTTON_NEXT_PIN) // rechts 835 else
825 action = ACTION_BUTTON_NEXT; 836 {
826 #ifdef BUTTON_CUSTOM_PIN 837 if(GPIO_Pin == BUTTON_NEXT_PIN) // rechts
827 else 838 {
828 if(GPIO_Pin == BUTTON_CUSTOM_PIN) // extra 839 if(!pSettings->FlipDisplay) action = ACTION_BUTTON_NEXT;
829 action = ACTION_BUTTON_CUSTOM; 840 else action = ACTION_BUTTON_BACK;
830 #endif 841 }
842 }
843 }
844 #ifdef BUTTON_CUSTOM_PIN
845 else
846 if(GPIO_Pin == BUTTON_CUSTOM_PIN) // extra
847 action = ACTION_BUTTON_CUSTOM;
848 #endif
831 849
832 #ifdef DEMOMODE // user pressed button ? 850 #ifdef DEMOMODE // user pressed button ?
833 if((!demoMachineCall) && demoModeActive()) 851 if((!demoMachineCall) && demoModeActive())
834 { 852 {
835 demoSendCommand(action); 853 demoSendCommand(action);