dap_scene_about.c 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #include "../dap_gui_i.h"
  2. #define DAP_VERSION_APP "0.1.0"
  3. #define DAP_DEVELOPED "Dr_Zlo"
  4. #define DAP_GITHUB "https://github.com/flipperdevices/flipperzero-good-faps"
  5. void dap_scene_about_on_enter(void* context) {
  6. DapGuiApp* app = context;
  7. FuriString* temp_str;
  8. temp_str = furi_string_alloc();
  9. furi_string_printf(temp_str, "\e#%s\n", "Information");
  10. furi_string_cat_printf(temp_str, "Version: %s\n", DAP_VERSION_APP);
  11. furi_string_cat_printf(temp_str, "Developed by: %s\n", DAP_DEVELOPED);
  12. furi_string_cat_printf(temp_str, "Github: %s\n\n", DAP_GITHUB);
  13. furi_string_cat_printf(temp_str, "\e#%s\n", "Description");
  14. furi_string_cat_printf(
  15. temp_str, "CMSIS-DAP debugger\nbased on Free-DAP\nThanks to Alex Taradov\n\n");
  16. furi_string_cat_printf(
  17. temp_str,
  18. "Supported protocols:\n"
  19. "SWD, JTAG, UART\n"
  20. "DAP v1 (cmsis_backend hid), DAP v2 (cmsis_backend usb_bulk), VCP\n");
  21. widget_add_text_box_element(
  22. app->widget,
  23. 0,
  24. 0,
  25. 128,
  26. 14,
  27. AlignCenter,
  28. AlignBottom,
  29. "\e#\e! \e!\n",
  30. false);
  31. widget_add_text_box_element(
  32. app->widget,
  33. 0,
  34. 2,
  35. 128,
  36. 14,
  37. AlignCenter,
  38. AlignBottom,
  39. "\e#\e! DAP Link \e!\n",
  40. false);
  41. widget_add_text_scroll_element(app->widget, 0, 16, 128, 50, furi_string_get_cstr(temp_str));
  42. furi_string_free(temp_str);
  43. view_dispatcher_switch_to_view(app->view_dispatcher, DapGuiAppViewWidget);
  44. }
  45. bool dap_scene_about_on_event(void* context, SceneManagerEvent event) {
  46. DapGuiApp* app = context;
  47. bool consumed = false;
  48. UNUSED(app);
  49. UNUSED(event);
  50. return consumed;
  51. }
  52. void dap_scene_about_on_exit(void* context) {
  53. DapGuiApp* app = context;
  54. // Clear views
  55. widget_reset(app->widget);
  56. }