diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2017-09-17 00:27:10 +0200 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2017-09-17 00:27:10 +0200 |
commit | 3d815406f49e22c492b9e0d4c18d457144fa7ca7 (patch) | |
tree | b0a567ea98887b88a5cdcee89b160d22c64a33f2 /firmware | |
parent | a486ee4fb8fa7676bfb23adddc9cd5986a0e680d (diff) | |
download | rockbox-3d815406f49e22c492b9e0d4c18d457144fa7ca7.tar.gz rockbox-3d815406f49e22c492b9e0d4c18d457144fa7ca7.zip |
Don't call touchscreen functions when we don't have a touchscreen
Change-Id: Ia8c05f45c289729031d6333445d932bb5ac242ca
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/target/arm/imx233/debug-imx233.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/firmware/target/arm/imx233/debug-imx233.c b/firmware/target/arm/imx233/debug-imx233.c index f65d881ea3..bfc38b20dc 100644 --- a/firmware/target/arm/imx233/debug-imx233.c +++ b/firmware/target/arm/imx233/debug-imx233.c | |||
@@ -1091,7 +1091,9 @@ bool dbg_hw_info_button(void) | |||
1091 | int vddio_val = orig_vddio_val; | 1091 | int vddio_val = orig_vddio_val; |
1092 | int vddio_brownout = orig_vddio_brownout; | 1092 | int vddio_brownout = orig_vddio_brownout; |
1093 | #endif | 1093 | #endif |
1094 | #ifdef HAVE_TOUCHSCREEN | ||
1094 | touchscreen_set_mode(TOUCHSCREEN_POINT); | 1095 | touchscreen_set_mode(TOUCHSCREEN_POINT); |
1096 | #endif | ||
1095 | 1097 | ||
1096 | while(1) | 1098 | while(1) |
1097 | { | 1099 | { |
@@ -1115,14 +1117,18 @@ bool dbg_hw_info_button(void) | |||
1115 | imx233_power_set_regulator(REGULATOR_VDDIO, orig_vddio_val, orig_vddio_brownout); | 1117 | imx233_power_set_regulator(REGULATOR_VDDIO, orig_vddio_val, orig_vddio_brownout); |
1116 | #endif | 1118 | #endif |
1117 | lcd_setfont(FONT_UI); | 1119 | lcd_setfont(FONT_UI); |
1120 | #ifdef HAVE_TOUCHSCREEN | ||
1118 | touchscreen_set_mode(TOUCHSCREEN_BUTTON); | 1121 | touchscreen_set_mode(TOUCHSCREEN_BUTTON); |
1122 | #endif | ||
1119 | return true; | 1123 | return true; |
1120 | case ACT_CANCEL: | 1124 | case ACT_CANCEL: |
1121 | #if IMX233_SUBTARGET >= 3700 | 1125 | #if IMX233_SUBTARGET >= 3700 |
1122 | imx233_power_set_regulator(REGULATOR_VDDIO, orig_vddio_val, orig_vddio_brownout); | 1126 | imx233_power_set_regulator(REGULATOR_VDDIO, orig_vddio_val, orig_vddio_brownout); |
1123 | #endif | 1127 | #endif |
1124 | lcd_setfont(FONT_UI); | 1128 | lcd_setfont(FONT_UI); |
1129 | #ifdef HAVE_TOUCHSCREEN | ||
1125 | touchscreen_set_mode(TOUCHSCREEN_BUTTON); | 1130 | touchscreen_set_mode(TOUCHSCREEN_BUTTON); |
1131 | #endif | ||
1126 | return false; | 1132 | return false; |
1127 | } | 1133 | } |
1128 | 1134 | ||
@@ -1483,8 +1489,10 @@ bool dbg_hw_info(void) | |||
1483 | int len = ARRAYLEN(debug_screens); | 1489 | int len = ARRAYLEN(debug_screens); |
1484 | int top_visible = 0; | 1490 | int top_visible = 0; |
1485 | int highlight = 0; | 1491 | int highlight = 0; |
1492 | #ifdef HAVE_TOUCHSCREEN | ||
1486 | enum touchscreen_mode old_mode = touchscreen_get_mode(); | 1493 | enum touchscreen_mode old_mode = touchscreen_get_mode(); |
1487 | touchscreen_set_mode(TOUCHSCREEN_BUTTON); | 1494 | touchscreen_set_mode(TOUCHSCREEN_BUTTON); |
1495 | #endif | ||
1488 | while(1) | 1496 | while(1) |
1489 | { | 1497 | { |
1490 | int button = my_get_action(HZ / 10); | 1498 | int button = my_get_action(HZ / 10); |
@@ -1503,7 +1511,9 @@ bool dbg_hw_info(void) | |||
1503 | lcd_setfont(FONT_UI); | 1511 | lcd_setfont(FONT_UI); |
1504 | break; | 1512 | break; |
1505 | case ACT_CANCEL: | 1513 | case ACT_CANCEL: |
1514 | #ifdef HAVE_TOUCHSCREEN | ||
1506 | touchscreen_set_mode(old_mode); | 1515 | touchscreen_set_mode(old_mode); |
1516 | #endif | ||
1507 | return false; | 1517 | return false; |
1508 | } | 1518 | } |
1509 | // adjust top visible if needed | 1519 | // adjust top visible if needed |
@@ -1534,7 +1544,9 @@ bool dbg_hw_info(void) | |||
1534 | lcd_update(); | 1544 | lcd_update(); |
1535 | yield(); | 1545 | yield(); |
1536 | } | 1546 | } |
1547 | #ifdef HAVE_TOUCHSCREEN | ||
1537 | touchscreen_set_mode(old_mode); | 1548 | touchscreen_set_mode(old_mode); |
1549 | #endif | ||
1538 | return false; | 1550 | return false; |
1539 | } | 1551 | } |
1540 | 1552 | ||