configs.h 10 KB

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