applications.c 6.5 KB

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