applications.c 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. #include "applications.h"
  2. #ifdef APP_TEST
  3. void flipper_test_app(void* p);
  4. #endif
  5. void application_blink(void* p);
  6. void application_uart_write(void* p);
  7. void application_input_dump(void* p);
  8. void u8g2_example(void* p);
  9. void input_task(void* p);
  10. void menu_task(void* p);
  11. void coreglitch_demo_0(void* p);
  12. void u8g2_qrcode(void* p);
  13. void fatfs_list(void* p);
  14. void gui_task(void* p);
  15. void backlight_control(void* p);
  16. void irda(void* p);
  17. void app_loader(void* p);
  18. void cc1101_workaround(void* p);
  19. void lf_rfid_workaround(void* p);
  20. void nfc_task(void* p);
  21. void dolphin_task(void* p);
  22. void power_task(void* p);
  23. void bt_task(void* p);
  24. void sd_card_test(void* p);
  25. void application_vibro(void* p);
  26. void app_gpio_test(void* p);
  27. void app_ibutton(void* p);
  28. void cli_task(void* p);
  29. void music_player(void* p);
  30. void sdnfc(void* p);
  31. void floopper_bloopper(void* p);
  32. void sd_filesystem(void* p);
  33. void gui_test(void* p);
  34. const FuriApplication FLIPPER_SERVICES[] = {
  35. #ifdef APP_CLI
  36. {.app = cli_task, .name = "cli_task", .stack_size = 1024, .icon = A_Plugins_14},
  37. #endif
  38. #ifdef APP_EXAMPLE_BLINK
  39. {.app = application_blink, .name = "blink", .stack_size = 1024, .icon = A_Plugins_14},
  40. #endif
  41. #ifdef APP_INPUT
  42. {.app = input_task, .name = "input_task", .stack_size = 1024, .icon = A_Plugins_14},
  43. #endif
  44. #ifdef APP_EXAMPLE_INPUT_DUMP
  45. {.app = application_input_dump, .name = "input dump", .stack_size = 1024, .icon = A_Plugins_14},
  46. #endif
  47. #ifdef APP_GUI
  48. {.app = backlight_control,
  49. .name = "backlight_control",
  50. .stack_size = 1024,
  51. .icon = A_Plugins_14},
  52. {.app = gui_task, .name = "gui_task", .stack_size = 1024, .icon = A_Plugins_14},
  53. #endif
  54. #ifdef APP_MENU
  55. {.app = menu_task, .name = "menu_task", .stack_size = 1024, .icon = A_Plugins_14},
  56. {.app = app_loader, .name = "app_loader", .stack_size = 1024, .icon = A_Plugins_14},
  57. #endif
  58. #ifdef APP_SD_FILESYSTEM
  59. {.app = sd_filesystem, .name = "sd_filesystem", .stack_size = 1024, .icon = A_Plugins_14},
  60. #endif
  61. #ifdef APP_DOLPHIN
  62. {.app = dolphin_task, .name = "dolphin_task", .stack_size = 1024, .icon = A_Plugins_14},
  63. #endif
  64. #ifdef APP_POWER
  65. {.app = power_task, .name = "power_task", .stack_size = 1024, .icon = A_Plugins_14},
  66. #endif
  67. #ifdef APP_BT
  68. {.app = bt_task, .name = "bt_task", .stack_size = 1024, .icon = A_Plugins_14},
  69. #endif
  70. #ifdef APP_CC1101
  71. {.app = cc1101_workaround,
  72. .name = "cc1101 workaround",
  73. .stack_size = 1024,
  74. .icon = A_Plugins_14},
  75. #endif
  76. #ifdef APP_LF_RFID
  77. {.app = lf_rfid_workaround,
  78. .name = "lf rfid workaround",
  79. .stack_size = 1024,
  80. .icon = A_Plugins_14},
  81. #endif
  82. #ifdef APP_IRDA
  83. {.app = irda, .name = "irda", .stack_size = 1024, .icon = A_Plugins_14},
  84. #endif
  85. #ifdef APP_NFC
  86. {.app = nfc_task, .name = "nfc_task", .stack_size = 1024, .icon = A_Plugins_14},
  87. #endif
  88. #ifdef APP_TEST
  89. {.app = flipper_test_app, .name = "test app", .stack_size = 1024, .icon = A_Plugins_14},
  90. #endif
  91. #ifdef APP_EXAMPLE_QRCODE
  92. {.app = u8g2_qrcode, .name = "u8g2_qrcode", .stack_size = 1024, .icon = A_Plugins_14},
  93. #endif
  94. #ifdef APP_EXAMPLE_FATFS
  95. {.app = fatfs_list, .name = "fatfs_list", .stack_size = 1024, .icon = A_Plugins_14},
  96. #endif
  97. #ifdef APP_EXAMPLE_DISPLAY
  98. {.app = u8g2_example, .name = "u8g2_example", .stack_size = 1024, .icon = A_Plugins_14},
  99. #endif
  100. #ifdef APP_SPEAKER_DEMO
  101. {.app = coreglitch_demo_0,
  102. .name = "coreglitch_demo_0",
  103. .stack_size = 1024,
  104. .icon = A_Plugins_14},
  105. #endif
  106. #ifdef APP_SD_TEST
  107. {.app = sd_card_test, .name = "sd_card_test", .stack_size = 4096, .icon = A_Plugins_14},
  108. #endif
  109. #ifdef APP_MUSIC_PLAYER
  110. {.app = music_player, .name = "music player", .stack_size = 1024, .icon = A_Plugins_14},
  111. #endif
  112. #ifdef APP_IBUTTON
  113. {.app = app_ibutton, .name = "ibutton", .stack_size = 1024, .icon = A_Plugins_14},
  114. #endif
  115. #ifdef APP_GPIO_DEMO
  116. {.app = app_gpio_test, .name = "gpio test", .stack_size = 1024, .icon = A_Plugins_14},
  117. #endif
  118. #ifdef APP_FLOOPPER_BLOOPPER
  119. {.app = floopper_bloopper, .name = "Floopper Bloopper", .stack_size = 1024, .icon = A_Games_14},
  120. #endif
  121. #ifdef APP_SDNFC
  122. {.app = sdnfc, .name = "sdnfc", .stack_size = 1024, .icon = A_Plugins_14},
  123. #endif
  124. #ifdef APP_GUI_TEST
  125. {.app = gui_test, .name = "gui_test", .icon = A_Plugins_14},
  126. #endif
  127. };
  128. size_t FLIPPER_SERVICES_size() {
  129. return sizeof(FLIPPER_SERVICES) / sizeof(FuriApplication);
  130. }
  131. // Main menu APP
  132. const FuriApplication FLIPPER_APPS[] = {
  133. #ifdef BUILD_CC1101
  134. {.app = cc1101_workaround, .name = "Sub-1 GHz", .stack_size = 1024, .icon = A_Sub1ghz_14},
  135. #endif
  136. #ifdef BUILD_LF_RFID
  137. {.app = lf_rfid_workaround, .name = "125 kHz RFID", .stack_size = 1024, .icon = A_125khz_14},
  138. #endif
  139. #ifdef BUILD_IRDA
  140. {.app = irda, .name = "Infrared", .stack_size = 1024, .icon = A_Infrared_14},
  141. #endif
  142. #ifdef BUILD_IBUTTON
  143. {.app = app_ibutton, .name = "iButton", .stack_size = 1024, .icon = A_iButton_14},
  144. #endif
  145. #ifdef BUILD_GPIO_DEMO
  146. {.app = app_gpio_test, .name = "GPIO", .stack_size = 1024, .icon = A_GPIO_14},
  147. #endif
  148. };
  149. size_t FLIPPER_APPS_size() {
  150. return sizeof(FLIPPER_APPS) / sizeof(FuriApplication);
  151. }
  152. // Plugin menu
  153. const FuriApplication FLIPPER_PLUGINS[] = {
  154. #ifdef BUILD_EXAMPLE_BLINK
  155. {.app = application_blink, .name = "blink", .stack_size = 1024, .icon = A_Plugins_14},
  156. #endif
  157. #ifdef BUILD_EXAMPLE_INPUT_DUMP
  158. {.app = application_input_dump, .name = "input dump", .stack_size = 1024, .icon = A_Plugins_14},
  159. #endif
  160. #ifdef BUILD_SPEAKER_DEMO
  161. {.app = coreglitch_demo_0,
  162. .name = "coreglitch_demo_0",
  163. .stack_size = 1024,
  164. .icon = A_Plugins_14},
  165. #endif
  166. #ifdef BUILD_SD_TEST
  167. {.app = sd_card_test, .name = "sd_card_test", .stack_size = 4096, .icon = A_Plugins_14},
  168. #endif
  169. #ifdef BUILD_VIBRO_DEMO
  170. {.app = application_vibro,
  171. .name = "application_vibro",
  172. .stack_size = 1024,
  173. .icon = A_Plugins_14},
  174. #endif
  175. #ifdef BUILD_MUSIC_PLAYER
  176. {.app = music_player, .name = "music player", .stack_size = 1024, .icon = A_Plugins_14},
  177. #endif
  178. #ifdef BUILD_FLOOPPER_BLOOPPER
  179. {.app = floopper_bloopper, .name = "Floopper Bloopper", .stack_size = 1024, .icon = A_Games_14},
  180. #endif
  181. #ifdef BUILD_SDNFC
  182. {.app = sdnfc, .name = "sdnfc", .stack_size = 1024, .icon = A_Plugins_14},
  183. #endif
  184. #ifdef BUILD_GUI_TEST
  185. {.app = gui_test, .name = "gui_test", .icon = A_Plugins_14},
  186. #endif
  187. };
  188. size_t FLIPPER_PLUGINS_size() {
  189. return sizeof(FLIPPER_PLUGINS) / sizeof(FuriApplication);
  190. }