applications.h 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. #pragma once
  2. #include "flipper.h"
  3. #ifdef APP_TEST
  4. void flipper_test_app(void* p);
  5. #endif
  6. void application_blink(void* p);
  7. void application_uart_write(void* p);
  8. void application_ipc_display(void* p);
  9. void application_ipc_widget(void* p);
  10. void application_input_dump(void* p);
  11. void display_u8g2(void* p);
  12. void u8g2_example(void* p);
  13. void input_task(void* p);
  14. void menu_task(void* p);
  15. void coreglitch_demo_0(void* p);
  16. void u8g2_qrcode(void* p);
  17. void fatfs_list(void* p);
  18. void gui_task(void* p);
  19. void backlight_control(void* p);
  20. void irda(void* p);
  21. void app_loader(void* p);
  22. void cc1101_workaround(void* p);
  23. void lf_rfid_workaround(void* p);
  24. void nfc_task(void* p);
  25. void dolphin_task(void* p);
  26. void power_task(void* p);
  27. void bt_task(void* p);
  28. void sd_card_test(void* p);
  29. void application_vibro(void* p);
  30. void app_gpio_test(void* p);
  31. void app_ibutton(void* p);
  32. void cli_task(void* p);
  33. void music_player(void* p);
  34. void sdnfc(void* p);
  35. void floopper_bloopper(void* p);
  36. void sd_filesystem(void* p);
  37. const FlipperStartupApp FLIPPER_STARTUP[] = {
  38. #ifdef APP_DISPLAY
  39. {.app = display_u8g2, .name = "display_u8g2", .libs = {0}, .icon = A_Plugins_14},
  40. #endif
  41. #ifdef APP_CLI
  42. {.app = cli_task, .name = "cli_task", .libs = {0}, .icon = A_Plugins_14},
  43. #endif
  44. #ifdef APP_EXAMPLE_BLINK
  45. {.app = application_blink,
  46. .name = "blink",
  47. .libs = {1, FURI_LIB{"input_task"}},
  48. .icon = A_Plugins_14},
  49. #endif
  50. #ifdef APP_INPUT
  51. {.app = input_task, .name = "input_task", .libs = {0}, .icon = A_Plugins_14},
  52. #endif
  53. #ifdef APP_EXAMPLE_INPUT_DUMP
  54. {.app = application_input_dump,
  55. .name = "input dump",
  56. .libs = {1, FURI_LIB{"input_task"}},
  57. .icon = A_Plugins_14},
  58. #endif
  59. #ifdef APP_GUI
  60. {.app = backlight_control,
  61. .name = "backlight_control",
  62. .libs = {1, FURI_LIB{"input_task"}},
  63. .icon = A_Plugins_14},
  64. {.app = gui_task, .name = "gui_task", .libs = {0}, .icon = A_Plugins_14},
  65. #endif
  66. #ifdef APP_MENU
  67. {.app = menu_task,
  68. .name = "menu_task",
  69. .libs = {1, FURI_LIB{"gui_task"}},
  70. .icon = A_Plugins_14},
  71. {.app = app_loader,
  72. .name = "app_loader",
  73. .libs = {2, FURI_LIB{"menu_task", "cli_task"}},
  74. .icon = A_Plugins_14},
  75. #endif
  76. #ifdef APP_SD_FILESYSTEM
  77. {.app = sd_filesystem,
  78. .name = "sd_filesystem",
  79. .libs = {1, FURI_LIB{"menu_task"}},
  80. .icon = A_Plugins_14},
  81. #endif
  82. #ifdef APP_DOLPHIN
  83. {.app = dolphin_task,
  84. .name = "dolphin_task",
  85. .libs = {1, FURI_LIB{"menu_task"}},
  86. .icon = A_Plugins_14},
  87. #endif
  88. #ifdef APP_POWER
  89. {.app = power_task,
  90. .name = "power_task",
  91. .libs = {2, FURI_LIB{"cli_task", "gui_task"}},
  92. .icon = A_Plugins_14},
  93. #endif
  94. #ifdef APP_BT
  95. {.app = bt_task, .name = "bt_task", .libs = {1, FURI_LIB{"cli_task"}}, .icon = A_Plugins_14},
  96. #endif
  97. #ifdef APP_CC1101
  98. {.app = cc1101_workaround,
  99. .name = "cc1101 workaround",
  100. .libs = {1, FURI_LIB{"gui_task"}},
  101. .icon = A_Plugins_14},
  102. #endif
  103. #ifdef APP_LF_RFID
  104. {.app = lf_rfid_workaround,
  105. .name = "lf rfid workaround",
  106. .libs = {1, FURI_LIB{"gui_task"}},
  107. .icon = A_Plugins_14},
  108. #endif
  109. #ifdef APP_IRDA
  110. {.app = irda, .name = "irda", .libs = {1, FURI_LIB{"gui_task"}}, .icon = A_Plugins_14},
  111. #endif
  112. #ifdef APP_NFC
  113. {.app = nfc_task, .name = "nfc_task", .libs = {1, FURI_LIB{"menu_task"}}, .icon = A_Plugins_14},
  114. #endif
  115. #ifdef APP_TEST
  116. {.app = flipper_test_app, .name = "test app", .libs = {0}, .icon = A_Plugins_14},
  117. #endif
  118. #ifdef APP_EXAMPLE_IPC
  119. {.app = application_ipc_display, .name = "ipc display", .libs = {0}, .icon = A_Plugins_14},
  120. {.app = application_ipc_widget, .name = "ipc widget", .libs = {0}, .icon = A_Plugins_14},
  121. #endif
  122. #ifdef APP_EXAMPLE_QRCODE
  123. {.app = u8g2_qrcode,
  124. .name = "u8g2_qrcode",
  125. .libs = {1, FURI_LIB{"display_u8g2"}},
  126. .icon = A_Plugins_14},
  127. #endif
  128. #ifdef APP_EXAMPLE_FATFS
  129. {.app = fatfs_list,
  130. .name = "fatfs_list",
  131. .libs = {2, FURI_LIB{"display_u8g2", "input_task"}},
  132. .icon = A_Plugins_14},
  133. #endif
  134. #ifdef APP_EXAMPLE_DISPLAY
  135. {.app = u8g2_example,
  136. .name = "u8g2_example",
  137. .libs = {1, FURI_LIB{"display_u8g2"}},
  138. .icon = A_Plugins_14},
  139. #endif
  140. #ifdef APP_SPEAKER_DEMO
  141. {.app = coreglitch_demo_0, .name = "coreglitch_demo_0", .libs = {0}, .icon = A_Plugins_14},
  142. #endif
  143. #ifdef APP_SD_TEST
  144. {.app = sd_card_test,
  145. .name = "sd_card_test",
  146. .libs = {2, FURI_LIB{"gui_task", "sd_filesystem"}},
  147. .icon = A_Plugins_14},
  148. #endif
  149. #ifdef APP_MUSIC_PLAYER
  150. {.app = music_player,
  151. .name = "music player",
  152. .libs = {1, FURI_LIB{"gui_task"}},
  153. .icon = A_Plugins_14},
  154. #endif
  155. #ifdef APP_IBUTTON
  156. {.app = app_ibutton,
  157. .name = "ibutton",
  158. .libs = {1, FURI_LIB{"gui_task"}},
  159. .icon = A_Plugins_14},
  160. #endif
  161. #ifdef APP_GPIO_DEMO
  162. {.app = app_gpio_test,
  163. .name = "gpio test",
  164. .libs = {1, FURI_LIB{"gui_task"}},
  165. .icon = A_Plugins_14},
  166. #endif
  167. #ifdef APP_FLOOPPER_BLOOPPER
  168. {.app = floopper_bloopper,
  169. .name = "Floopper Bloopper",
  170. .libs = {1, FURI_LIB{"gui_task"}},
  171. .icon = A_Games_14},
  172. #endif
  173. #ifdef APP_SDNFC
  174. {.app = sdnfc, .name = "sdnfc", .libs = {1, FURI_LIB{"gui_task"}}, .icon = A_Plugins_14},
  175. #endif
  176. };
  177. // Main menu APP
  178. const FlipperStartupApp FLIPPER_APPS[] = {
  179. #ifdef BUILD_CC1101
  180. {.app = cc1101_workaround,
  181. .name = "Sub-1 GHz",
  182. .libs = {1, FURI_LIB{"gui_task"}},
  183. .icon = A_Sub1ghz_14},
  184. #endif
  185. #ifdef BUILD_LF_RFID
  186. {.app = lf_rfid_workaround,
  187. .name = "125 kHz RFID",
  188. .libs = {1, FURI_LIB{"gui_task"}},
  189. .icon = A_125khz_14},
  190. #endif
  191. #ifdef BUILD_IRDA
  192. {.app = irda, .name = "Infrared", .libs = {1, FURI_LIB{"gui_task"}}, .icon = A_Infrared_14},
  193. #endif
  194. #ifdef BUILD_IBUTTON
  195. {.app = app_ibutton,
  196. .name = "iButton",
  197. .libs = {1, FURI_LIB{"gui_task"}},
  198. .icon = A_iButton_14},
  199. #endif
  200. #ifdef BUILD_GPIO_DEMO
  201. {.app = app_gpio_test, .name = "GPIO", .libs = {1, FURI_LIB{"gui_task"}}, .icon = A_GPIO_14},
  202. #endif
  203. };
  204. // Plugin menu
  205. const FlipperStartupApp FLIPPER_PLUGINS[] = {
  206. #ifdef BUILD_EXAMPLE_BLINK
  207. {.app = application_blink,
  208. .name = "blink",
  209. .libs = {1, FURI_LIB{"input_task"}},
  210. .icon = A_Plugins_14},
  211. #endif
  212. #ifdef BUILD_EXAMPLE_INPUT_DUMP
  213. {.app = application_input_dump,
  214. .name = "input dump",
  215. .libs = {1, FURI_LIB{"input_task"}},
  216. .icon = A_Plugins_14},
  217. #endif
  218. #ifdef BUILD_SPEAKER_DEMO
  219. {.app = coreglitch_demo_0, .name = "coreglitch_demo_0", .libs = {0}, .icon = A_Plugins_14},
  220. #endif
  221. #ifdef BUILD_SD_TEST
  222. {.app = sd_card_test,
  223. .name = "sd_card_test",
  224. .libs = {2, FURI_LIB{"gui_task", "sd_filesystem"}},
  225. .icon = A_Plugins_14},
  226. #endif
  227. #ifdef BUILD_VIBRO_DEMO
  228. {.app = application_vibro,
  229. .name = "application_vibro",
  230. .libs = {1, FURI_LIB{"input_task"}},
  231. .icon = A_Plugins_14},
  232. #endif
  233. #ifdef BUILD_MUSIC_PLAYER
  234. {.app = music_player,
  235. .name = "music player",
  236. .libs = {1, FURI_LIB{"gui_task"}},
  237. .icon = A_Plugins_14},
  238. #endif
  239. #ifdef BUILD_FLOOPPER_BLOOPPER
  240. {.app = floopper_bloopper,
  241. .name = "Floopper Bloopper",
  242. .libs = {1, FURI_LIB{"gui_task"}},
  243. .icon = A_Games_14},
  244. #endif
  245. #ifdef BUILD_SDNFC
  246. {.app = sdnfc, .name = "sdnfc", .libs = {1, FURI_LIB{"gui_task"}}, .icon = A_Plugins_14},
  247. #endif
  248. };