applications.h 6.5 KB

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