diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/debug_menu.c | 36 | ||||
-rw-r--r-- | apps/main.c | 11 |
2 files changed, 47 insertions, 0 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index a101097004..8e16ff1c21 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -124,6 +124,10 @@ | |||
124 | 124 | ||
125 | #include "talk.h" | 125 | #include "talk.h" |
126 | 126 | ||
127 | #if defined(HAVE_DEVICEDATA)// && !defined(SIMULATOR) | ||
128 | #include "devicedata.h" | ||
129 | #endif | ||
130 | |||
127 | #if defined(HAVE_BOOTDATA) && !defined(SIMULATOR) | 131 | #if defined(HAVE_BOOTDATA) && !defined(SIMULATOR) |
128 | #include "bootdata.h" | 132 | #include "bootdata.h" |
129 | #include "multiboot.h" | 133 | #include "multiboot.h" |
@@ -2625,6 +2629,33 @@ static bool dbg_boot_data(void) | |||
2625 | } | 2629 | } |
2626 | #endif /* defined(HAVE_BOOTDATA) && !defined(SIMULATOR) */ | 2630 | #endif /* defined(HAVE_BOOTDATA) && !defined(SIMULATOR) */ |
2627 | 2631 | ||
2632 | #if defined(HAVE_DEVICEDATA)// && !defined(SIMULATOR) | ||
2633 | static bool dbg_device_data(void) | ||
2634 | { | ||
2635 | struct simplelist_info info; | ||
2636 | info.scroll_all = true; | ||
2637 | simplelist_info_init(&info, "Device data", 1, NULL); | ||
2638 | simplelist_set_line_count(0); | ||
2639 | |||
2640 | simplelist_addline("Device data"); | ||
2641 | |||
2642 | #if defined(EROS_QN) | ||
2643 | simplelist_addline("Lcd Version: %d", (int)device_data.lcd_version); | ||
2644 | #endif | ||
2645 | |||
2646 | simplelist_addline("Device data RAW:"); | ||
2647 | for (size_t i = 0; i < device_data.length; i += 4) | ||
2648 | { | ||
2649 | simplelist_addline("%02x: %02x %02x %02x %02x", i, | ||
2650 | device_data.payload[i + 0], device_data.payload[i + 1], | ||
2651 | device_data.payload[i + 2], device_data.payload[i + 3]); | ||
2652 | } | ||
2653 | |||
2654 | return simplelist_show_list(&info); | ||
2655 | } | ||
2656 | #endif /* defined(HAVE_DEVICEDATA)*/ | ||
2657 | |||
2658 | |||
2628 | #if defined(IPOD_6G) && !defined(SIMULATOR) | 2659 | #if defined(IPOD_6G) && !defined(SIMULATOR) |
2629 | #define SYSCFG_MAX_ENTRIES 9 // 9 on iPod Classic/6G | 2660 | #define SYSCFG_MAX_ENTRIES 9 // 9 on iPod Classic/6G |
2630 | 2661 | ||
@@ -2823,6 +2854,11 @@ static const struct { | |||
2823 | #if defined(HAVE_BOOTDATA) && !defined(SIMULATOR) | 2854 | #if defined(HAVE_BOOTDATA) && !defined(SIMULATOR) |
2824 | {"Boot data", dbg_boot_data }, | 2855 | {"Boot data", dbg_boot_data }, |
2825 | #endif | 2856 | #endif |
2857 | |||
2858 | #if defined(HAVE_DEVICEDATA)// && !defined(SIMULATOR) | ||
2859 | {"Device data", dbg_device_data }, | ||
2860 | #endif | ||
2861 | |||
2826 | #if defined(IPOD_6G) && !defined(SIMULATOR) | 2862 | #if defined(IPOD_6G) && !defined(SIMULATOR) |
2827 | {"View SysCfg", dbg_syscfg }, | 2863 | {"View SysCfg", dbg_syscfg }, |
2828 | #endif | 2864 | #endif |
diff --git a/apps/main.c b/apps/main.c index 4c7689ce8c..1e8e872296 100644 --- a/apps/main.c +++ b/apps/main.c | |||
@@ -78,6 +78,10 @@ | |||
78 | #include "bootchart.h" | 78 | #include "bootchart.h" |
79 | #include "logdiskf.h" | 79 | #include "logdiskf.h" |
80 | #include "bootdata.h" | 80 | #include "bootdata.h" |
81 | #if defined(HAVE_DEVICEDATA) | ||
82 | #include "devicedata.h" | ||
83 | #endif | ||
84 | |||
81 | #if (CONFIG_PLATFORM & PLATFORM_ANDROID) | 85 | #if (CONFIG_PLATFORM & PLATFORM_ANDROID) |
82 | #include "notification.h" | 86 | #include "notification.h" |
83 | #endif | 87 | #endif |
@@ -176,6 +180,9 @@ int main(void) | |||
176 | } | 180 | } |
177 | list_init(); | 181 | list_init(); |
178 | tree_init(); | 182 | tree_init(); |
183 | #if defined(HAVE_DEVICEDATA) && !defined(BOOTLOADER) /* SIMULATOR */ | ||
184 | verify_device_data(); | ||
185 | #endif | ||
179 | /* Keep the order of this 3 | 186 | /* Keep the order of this 3 |
180 | * Must be done before any code uses the multi-screen API */ | 187 | * Must be done before any code uses the multi-screen API */ |
181 | #ifdef HAVE_USBSTACK | 188 | #ifdef HAVE_USBSTACK |
@@ -459,6 +466,10 @@ static void init(void) | |||
459 | verify_boot_data(); | 466 | verify_boot_data(); |
460 | #endif | 467 | #endif |
461 | 468 | ||
469 | #if defined(HAVE_DEVICEDATA) && !defined(BOOTLOADER) | ||
470 | verify_device_data(); | ||
471 | #endif | ||
472 | |||
462 | /* early early early! */ | 473 | /* early early early! */ |
463 | filesystem_init(); | 474 | filesystem_init(); |
464 | 475 | ||