configs.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  1. #ifndef configs_h
  2. #define configs_h
  3. #define POLISH_POTATO
  4. //#define MARAUDER_MINI
  5. //#define MARAUDER_V4
  6. //#define MARAUDER_V6
  7. //#define MARAUDER_KIT
  8. //#define GENERIC_ESP32
  9. #define MARAUDER_FLIPPER
  10. #define ESP32_CAM
  11. #define DISABLE_RGB_LED
  12. #define USE_SD_MMC_ALTERNATIVE
  13. //#define ESP32_LDDB
  14. #define MARAUDER_VERSION "v0.10.0"
  15. //// BUTTON DEFINITIONS
  16. #ifdef MARAUDER_MINI
  17. #define L_BTN 13
  18. #define C_BTN 34
  19. #define U_BTN 36
  20. #define R_BTN 39
  21. #define D_BTN 35
  22. #endif
  23. #ifdef MARAUDER_V4
  24. #endif
  25. //// END BUTTON DEFINITIONS
  26. //// DISPLAY DEFINITIONS
  27. #ifdef MARAUDER_V4
  28. #define BANNER_TEXT_SIZE 2
  29. #ifndef TFT_WIDTH
  30. #define TFT_WIDTH 240
  31. #endif
  32. #ifndef TFT_HEIGHT
  33. #define TFT_HEIGHT 320
  34. #endif
  35. #define TFT_SHIELD
  36. #define SCREEN_WIDTH TFT_WIDTH
  37. #define SCREEN_HEIGHT TFT_HEIGHT
  38. #define HEIGHT_1 TFT_WIDTH
  39. #define WIDTH_1 TFT_HEIGHT
  40. #define STANDARD_FONT_CHAR_LIMIT (TFT_WIDTH/6) // number of characters on a single line with normal font
  41. #define TEXT_HEIGHT 16 // Height of text to be printed and scrolled
  42. #define BOT_FIXED_AREA 0 // Number of lines in bottom fixed area (lines counted from bottom of screen)
  43. #define TOP_FIXED_AREA 48 // Number of lines in top fixed area (lines counted from top of screen)
  44. #define YMAX 320 // Bottom of screen area
  45. #define minimum(a,b) (((a) < (b)) ? (a) : (b))
  46. //#define MENU_FONT NULL
  47. #define MENU_FONT &FreeMono9pt7b // Winner
  48. //#define MENU_FONT &FreeMonoBold9pt7b
  49. //#define MENU_FONT &FreeSans9pt7b
  50. //#define MENU_FONT &FreeSansBold9pt7b
  51. #define BUTTON_ARRAY_LEN 10
  52. #define STATUS_BAR_WIDTH 16
  53. #define LVGL_TICK_PERIOD 6
  54. #define FRAME_X 100
  55. #define FRAME_Y 64
  56. #define FRAME_W 120
  57. #define FRAME_H 50
  58. // Red zone size
  59. #define REDBUTTON_X FRAME_X
  60. #define REDBUTTON_Y FRAME_Y
  61. #define REDBUTTON_W (FRAME_W/2)
  62. #define REDBUTTON_H FRAME_H
  63. // Green zone size
  64. #define GREENBUTTON_X (REDBUTTON_X + REDBUTTON_W)
  65. #define GREENBUTTON_Y FRAME_Y
  66. #define GREENBUTTON_W (FRAME_W/2)
  67. #define GREENBUTTON_H FRAME_H
  68. #define STATUSBAR_COLOR 0x4A49
  69. #define KIT_LED_BUILTIN 13
  70. #endif
  71. #ifdef MARAUDER_V6
  72. #define BANNER_TEXT_SIZE 2
  73. #ifndef TFT_WIDTH
  74. #define TFT_WIDTH 240
  75. #endif
  76. #ifndef TFT_HEIGHT
  77. #define TFT_HEIGHT 320
  78. #endif
  79. #define TFT_DIY
  80. #define SCREEN_WIDTH TFT_WIDTH
  81. #define SCREEN_HEIGHT TFT_HEIGHT
  82. #define HEIGHT_1 TFT_WIDTH
  83. #define WIDTH_1 TFT_HEIGHT
  84. #define STANDARD_FONT_CHAR_LIMIT (TFT_WIDTH/6) // number of characters on a single line with normal font
  85. #define TEXT_HEIGHT 16 // Height of text to be printed and scrolled
  86. #define BOT_FIXED_AREA 0 // Number of lines in bottom fixed area (lines counted from bottom of screen)
  87. #define TOP_FIXED_AREA 48 // Number of lines in top fixed area (lines counted from top of screen)
  88. #define YMAX 320 // Bottom of screen area
  89. #define minimum(a,b) (((a) < (b)) ? (a) : (b))
  90. //#define MENU_FONT NULL
  91. #define MENU_FONT &FreeMono9pt7b // Winner
  92. //#define MENU_FONT &FreeMonoBold9pt7b
  93. //#define MENU_FONT &FreeSans9pt7b
  94. //#define MENU_FONT &FreeSansBold9pt7b
  95. #define BUTTON_ARRAY_LEN 10
  96. #define STATUS_BAR_WIDTH 16
  97. #define LVGL_TICK_PERIOD 6
  98. #define FRAME_X 100
  99. #define FRAME_Y 64
  100. #define FRAME_W 120
  101. #define FRAME_H 50
  102. // Red zone size
  103. #define REDBUTTON_X FRAME_X
  104. #define REDBUTTON_Y FRAME_Y
  105. #define REDBUTTON_W (FRAME_W/2)
  106. #define REDBUTTON_H FRAME_H
  107. // Green zone size
  108. #define GREENBUTTON_X (REDBUTTON_X + REDBUTTON_W)
  109. #define GREENBUTTON_Y FRAME_Y
  110. #define GREENBUTTON_W (FRAME_W/2)
  111. #define GREENBUTTON_H FRAME_H
  112. #define STATUSBAR_COLOR 0x4A49
  113. #define KIT_LED_BUILTIN 13
  114. #endif
  115. #ifdef MARAUDER_KIT
  116. #define BANNER_TEXT_SIZE 2
  117. #ifndef TFT_WIDTH
  118. #define TFT_WIDTH 240
  119. #endif
  120. #ifndef TFT_HEIGHT
  121. #define TFT_HEIGHT 320
  122. #endif
  123. #define TFT_DIY
  124. #define KIT
  125. #define SCREEN_WIDTH TFT_WIDTH
  126. #define SCREEN_HEIGHT TFT_HEIGHT
  127. #define HEIGHT_1 TFT_WIDTH
  128. #define WIDTH_1 TFT_HEIGHT
  129. #define STANDARD_FONT_CHAR_LIMIT (TFT_WIDTH/6) // number of characters on a single line with normal font
  130. #define TEXT_HEIGHT 16 // Height of text to be printed and scrolled
  131. #define BOT_FIXED_AREA 0 // Number of lines in bottom fixed area (lines counted from bottom of screen)
  132. #define TOP_FIXED_AREA 48 // Number of lines in top fixed area (lines counted from top of screen)
  133. #define YMAX 320 // Bottom of screen area
  134. #define minimum(a,b) (((a) < (b)) ? (a) : (b))
  135. //#define MENU_FONT NULL
  136. #define MENU_FONT &FreeMono9pt7b // Winner
  137. //#define MENU_FONT &FreeMonoBold9pt7b
  138. //#define MENU_FONT &FreeSans9pt7b
  139. //#define MENU_FONT &FreeSansBold9pt7b
  140. #define BUTTON_ARRAY_LEN 10
  141. #define STATUS_BAR_WIDTH 16
  142. #define LVGL_TICK_PERIOD 6
  143. #define FRAME_X 100
  144. #define FRAME_Y 64
  145. #define FRAME_W 120
  146. #define FRAME_H 50
  147. // Red zone size
  148. #define REDBUTTON_X FRAME_X
  149. #define REDBUTTON_Y FRAME_Y
  150. #define REDBUTTON_W (FRAME_W/2)
  151. #define REDBUTTON_H FRAME_H
  152. // Green zone size
  153. #define GREENBUTTON_X (REDBUTTON_X + REDBUTTON_W)
  154. #define GREENBUTTON_Y FRAME_Y
  155. #define GREENBUTTON_W (FRAME_W/2)
  156. #define GREENBUTTON_H FRAME_H
  157. #define STATUSBAR_COLOR 0x4A49
  158. #define KIT_LED_BUILTIN 13
  159. #endif
  160. #ifdef MARAUDER_MINI
  161. #define TFT_MISO 19
  162. #define TFT_MOSI 23
  163. #define TFT_SCLK 18
  164. #define TFT_CS 27
  165. #define TFT_DC 26
  166. #define TFT_RST 5
  167. #define TFT_BL 32
  168. #define TOUCH_CS 21
  169. #define SD_CS 4
  170. #define SCREEN_BUFFER
  171. #define MAX_SCREEN_BUFFER 9
  172. #define BANNER_TEXT_SIZE 1
  173. #ifndef TFT_WIDTH
  174. #define TFT_WIDTH 128
  175. #endif
  176. #ifndef TFT_HEIGHT
  177. #define TFT_HEIGHT 128
  178. #endif
  179. #define CHAR_WIDTH 6
  180. #define SCREEN_WIDTH TFT_WIDTH // Originally 240
  181. #define SCREEN_HEIGHT TFT_HEIGHT // Originally 320
  182. #define HEIGHT_1 TFT_WIDTH
  183. #define WIDTH_1 TFT_WIDTH
  184. #define STANDARD_FONT_CHAR_LIMIT (TFT_WIDTH/6) // number of characters on a single line with normal font
  185. #define TEXT_HEIGHT (TFT_HEIGHT/10) // Height of text to be printed and scrolled
  186. #define BOT_FIXED_AREA 0 // Number of lines in bottom fixed area (lines counted from bottom of screen)
  187. #define TOP_FIXED_AREA 48 // Number of lines in top fixed area (lines counted from top of screen)
  188. #define YMAX TFT_HEIGHT // Bottom of screen area
  189. #define minimum(a,b) (((a) < (b)) ? (a) : (b))
  190. //#define MENU_FONT NULL
  191. #define MENU_FONT &FreeMono9pt7b // Winner
  192. //#define MENU_FONT &FreeMonoBold9pt7b
  193. //#define MENU_FONT &FreeSans9pt7b
  194. //#define MENU_FONT &FreeSansBold9pt7b
  195. #define BUTTON_ARRAY_LEN 10
  196. #define STATUS_BAR_WIDTH (TFT_HEIGHT/16)
  197. #define LVGL_TICK_PERIOD 6
  198. #define FRAME_X 100
  199. #define FRAME_Y 64
  200. #define FRAME_W 120
  201. #define FRAME_H 50
  202. // Red zone size
  203. #define REDBUTTON_X FRAME_X
  204. #define REDBUTTON_Y FRAME_Y
  205. #define REDBUTTON_W (FRAME_W/2)
  206. #define REDBUTTON_H FRAME_H
  207. // Green zone size
  208. #define GREENBUTTON_X (REDBUTTON_X + REDBUTTON_W)
  209. #define GREENBUTTON_Y FRAME_Y
  210. #define GREENBUTTON_W (FRAME_W/2)
  211. #define GREENBUTTON_H FRAME_H
  212. #define STATUSBAR_COLOR 0x4A49
  213. #endif
  214. //// END DISPLAY DEFINITIONS
  215. //// MENU DEFINITIONS
  216. #ifdef MARAUDER_V4
  217. #define BANNER_TIME 100
  218. #define COMMAND_PREFIX "!"
  219. // Keypad start position, key sizes and spacing
  220. #define KEY_X 120 // Centre of key
  221. #define KEY_Y 50
  222. #define KEY_W 240 // Width and height
  223. #define KEY_H 22
  224. #define KEY_SPACING_X 0 // X and Y gap
  225. #define KEY_SPACING_Y 1
  226. #define KEY_TEXTSIZE 1 // Font size multiplier
  227. #define ICON_W 22
  228. #define ICON_H 22
  229. #define BUTTON_PADDING 22
  230. //#define BUTTON_ARRAY_LEN 5
  231. #endif
  232. #ifdef MARAUDER_V6
  233. #define BANNER_TIME 100
  234. #define COMMAND_PREFIX "!"
  235. // Keypad start position, key sizes and spacing
  236. #define KEY_X 120 // Centre of key
  237. #define KEY_Y 50
  238. #define KEY_W 240 // Width and height
  239. #define KEY_H 22
  240. #define KEY_SPACING_X 0 // X and Y gap
  241. #define KEY_SPACING_Y 1
  242. #define KEY_TEXTSIZE 1 // Font size multiplier
  243. #define ICON_W 22
  244. #define ICON_H 22
  245. #define BUTTON_PADDING 22
  246. //#define BUTTON_ARRAY_LEN 5
  247. #endif
  248. #ifdef MARAUDER_KIT
  249. #define BANNER_TIME 100
  250. #define COMMAND_PREFIX "!"
  251. // Keypad start position, key sizes and spacing
  252. #define KEY_X 120 // Centre of key
  253. #define KEY_Y 50
  254. #define KEY_W 240 // Width and height
  255. #define KEY_H 22
  256. #define KEY_SPACING_X 0 // X and Y gap
  257. #define KEY_SPACING_Y 1
  258. #define KEY_TEXTSIZE 1 // Font size multiplier
  259. #define ICON_W 22
  260. #define ICON_H 22
  261. #define BUTTON_PADDING 22
  262. //#define BUTTON_ARRAY_LEN 5
  263. #endif
  264. #ifdef MARAUDER_MINI
  265. #define BANNER_TIME 50
  266. #define COMMAND_PREFIX "!"
  267. // Keypad start position, key sizes and spacing
  268. #define KEY_X (TFT_WIDTH/2) // Centre of key
  269. #define KEY_Y (TFT_HEIGHT/4.5)
  270. #define KEY_W TFT_WIDTH // Width and height
  271. #define KEY_H (TFT_HEIGHT/12.8)
  272. #define KEY_SPACING_X 0 // X and Y gap
  273. #define KEY_SPACING_Y 1
  274. #define KEY_TEXTSIZE 1 // Font size multiplier
  275. #define ICON_W 22
  276. #define ICON_H 22
  277. #define BUTTON_PADDING 10
  278. #endif
  279. //// END MENU DEFINITIONS
  280. //// SD DEFINITIONS
  281. #ifdef MARAUDER_V4
  282. #define SD_CS 12
  283. #endif
  284. #ifdef MARAUDER_V6
  285. #define SD_CS 12
  286. #endif
  287. #ifdef MARAUDER_KIT
  288. #define SD_CS 12
  289. #endif
  290. #ifdef MARAUDER_MINI
  291. #define SD_CS 4
  292. #endif
  293. #ifdef MARAUDER_FLIPPER
  294. #define SD_CS 10
  295. #endif
  296. #ifdef ESP32_LDDB
  297. #define SD_CS 4
  298. #endif
  299. //// END SD DEFINITIONS
  300. //// SCREEN STUFF
  301. #ifdef MARAUDER_MINI
  302. #define HAS_SCREEN
  303. #define HAS_BT
  304. #endif
  305. #ifdef MARAUDER_V4
  306. #define HAS_SCREEN
  307. #define HAS_BT
  308. #endif
  309. #ifdef MARAUDER_V6
  310. #define HAS_SCREEN
  311. #define HAS_BT
  312. #endif
  313. #ifdef MARAUDER_KIT
  314. #define HAS_SCREEN
  315. #define HAS_BT
  316. #endif
  317. #ifdef GENERIC_ESP32
  318. #define HAS_BT
  319. #endif
  320. #ifndef HAS_SCREEN
  321. #define TFT_WHITE 0
  322. #define TFT_CYAN 0
  323. #define TFT_BLUE 0
  324. #define TFT_RED 0
  325. #define TFT_GREEN 0
  326. #define TFT_GREY 0
  327. #define TFT_GRAY 0
  328. #define TFT_MAGENTA 0
  329. #define TFT_VIOLET 0
  330. #define TFT_ORANGE 0
  331. #define TFT_YELLOW 0
  332. #define STANDARD_FONT_CHAR_LIMIT 40
  333. #define FLASH_BUTTON -1
  334. #include <FS.h>
  335. #include <functional>
  336. #include <LinkedList.h>
  337. #include "SPIFFS.h"
  338. #include "Assets.h"
  339. #endif
  340. //// END SCREEN STUFF
  341. //// NEOPIXEL STUFF
  342. #ifdef ESP32_LDDB
  343. #define PIN 17
  344. #else
  345. #define PIN 25
  346. #endif
  347. #endif