configs.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400
  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.9"
  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 BANNER_TEXT_SIZE 1
  167. #ifndef TFT_WIDTH
  168. #define TFT_WIDTH 128
  169. #endif
  170. #ifndef TFT_HEIGHT
  171. #define TFT_HEIGHT 128
  172. #endif
  173. #define SCREEN_WIDTH TFT_WIDTH // Originally 240
  174. #define SCREEN_HEIGHT TFT_HEIGHT // Originally 320
  175. #define HEIGHT_1 TFT_WIDTH
  176. #define WIDTH_1 TFT_WIDTH
  177. #define STANDARD_FONT_CHAR_LIMIT (TFT_WIDTH/6) // number of characters on a single line with normal font
  178. #define TEXT_HEIGHT (TFT_HEIGHT/10) // Height of text to be printed and scrolled
  179. #define BOT_FIXED_AREA 0 // Number of lines in bottom fixed area (lines counted from bottom of screen)
  180. #define TOP_FIXED_AREA 48 // Number of lines in top fixed area (lines counted from top of screen)
  181. #define YMAX TFT_HEIGHT // Bottom of screen area
  182. #define minimum(a,b) (((a) < (b)) ? (a) : (b))
  183. //#define MENU_FONT NULL
  184. #define MENU_FONT &FreeMono9pt7b // Winner
  185. //#define MENU_FONT &FreeMonoBold9pt7b
  186. //#define MENU_FONT &FreeSans9pt7b
  187. //#define MENU_FONT &FreeSansBold9pt7b
  188. #define BUTTON_ARRAY_LEN 9
  189. #define STATUS_BAR_WIDTH (TFT_HEIGHT/16)
  190. #define LVGL_TICK_PERIOD 6
  191. #define FRAME_X 100
  192. #define FRAME_Y 64
  193. #define FRAME_W 120
  194. #define FRAME_H 50
  195. // Red zone size
  196. #define REDBUTTON_X FRAME_X
  197. #define REDBUTTON_Y FRAME_Y
  198. #define REDBUTTON_W (FRAME_W/2)
  199. #define REDBUTTON_H FRAME_H
  200. // Green zone size
  201. #define GREENBUTTON_X (REDBUTTON_X + REDBUTTON_W)
  202. #define GREENBUTTON_Y FRAME_Y
  203. #define GREENBUTTON_W (FRAME_W/2)
  204. #define GREENBUTTON_H FRAME_H
  205. #define STATUSBAR_COLOR 0x4A49
  206. #endif
  207. //// END DISPLAY DEFINITIONS
  208. //// MENU DEFINITIONS
  209. #ifdef MARAUDER_V4
  210. #define BANNER_TIME 100
  211. #define COMMAND_PREFIX "!"
  212. // Keypad start position, key sizes and spacing
  213. #define KEY_X 120 // Centre of key
  214. #define KEY_Y 50
  215. #define KEY_W 240 // Width and height
  216. #define KEY_H 22
  217. #define KEY_SPACING_X 0 // X and Y gap
  218. #define KEY_SPACING_Y 1
  219. #define KEY_TEXTSIZE 1 // Font size multiplier
  220. #define ICON_W 22
  221. #define ICON_H 22
  222. #define BUTTON_PADDING 22
  223. //#define BUTTON_ARRAY_LEN 5
  224. #endif
  225. #ifdef MARAUDER_V6
  226. #define BANNER_TIME 100
  227. #define COMMAND_PREFIX "!"
  228. // Keypad start position, key sizes and spacing
  229. #define KEY_X 120 // Centre of key
  230. #define KEY_Y 50
  231. #define KEY_W 240 // Width and height
  232. #define KEY_H 22
  233. #define KEY_SPACING_X 0 // X and Y gap
  234. #define KEY_SPACING_Y 1
  235. #define KEY_TEXTSIZE 1 // Font size multiplier
  236. #define ICON_W 22
  237. #define ICON_H 22
  238. #define BUTTON_PADDING 22
  239. //#define BUTTON_ARRAY_LEN 5
  240. #endif
  241. #ifdef MARAUDER_KIT
  242. #define BANNER_TIME 100
  243. #define COMMAND_PREFIX "!"
  244. // Keypad start position, key sizes and spacing
  245. #define KEY_X 120 // Centre of key
  246. #define KEY_Y 50
  247. #define KEY_W 240 // Width and height
  248. #define KEY_H 22
  249. #define KEY_SPACING_X 0 // X and Y gap
  250. #define KEY_SPACING_Y 1
  251. #define KEY_TEXTSIZE 1 // Font size multiplier
  252. #define ICON_W 22
  253. #define ICON_H 22
  254. #define BUTTON_PADDING 22
  255. //#define BUTTON_ARRAY_LEN 5
  256. #endif
  257. #ifdef MARAUDER_MINI
  258. #define BANNER_TIME 50
  259. #define COMMAND_PREFIX "!"
  260. // Keypad start position, key sizes and spacing
  261. #define KEY_X (TFT_WIDTH/2) // Centre of key
  262. #define KEY_Y (TFT_HEIGHT/4.5)
  263. #define KEY_W TFT_WIDTH // Width and height
  264. #define KEY_H (TFT_HEIGHT/12.8)
  265. #define KEY_SPACING_X 0 // X and Y gap
  266. #define KEY_SPACING_Y 1
  267. #define KEY_TEXTSIZE 1 // Font size multiplier
  268. #define ICON_W 22
  269. #define ICON_H 22
  270. #define BUTTON_PADDING 10
  271. #endif
  272. //// END MENU DEFINITIONS
  273. //// SD DEFINITIONS
  274. #ifdef MARAUDER_V4
  275. #define SD_CS 12
  276. #endif
  277. #ifdef MARAUDER_V6
  278. #define SD_CS 12
  279. #endif
  280. #ifdef MARAUDER_KIT
  281. #define SD_CS 12
  282. #endif
  283. #ifdef MARAUDER_MINI
  284. #define SD_CS 4
  285. #endif
  286. #ifdef MARAUDER_FLIPPER
  287. #define SD_CS -1
  288. #endif
  289. //// END SD DEFINITIONS
  290. //// SCREEN STUFF
  291. #ifdef MARAUDER_MINI
  292. #define HAS_SCREEN
  293. #define HAS_BT
  294. #endif
  295. #ifdef MARAUDER_V4
  296. #define HAS_SCREEN
  297. #define HAS_BT
  298. #endif
  299. #ifdef MARAUDER_V6
  300. #define HAS_SCREEN
  301. #define HAS_BT
  302. #endif
  303. #ifdef MARAUDER_KIT
  304. #define HAS_SCREEN
  305. #define HAS_BT
  306. #endif
  307. #ifdef GENERIC_ESP32
  308. #define HAS_BT
  309. #endif
  310. #ifndef HAS_SCREEN
  311. #define TFT_CYAN 0
  312. #define TFT_BLUE 0
  313. #define TFT_RED 0
  314. #define TFT_GREEN 0
  315. #define TFT_GREY 0
  316. #define TFT_GRAY 0
  317. #define TFT_MAGENTA 0
  318. #define TFT_VIOLET 0
  319. #define TFT_ORANGE 0
  320. #define TFT_YELLOW 0
  321. #define STANDARD_FONT_CHAR_LIMIT 40
  322. #define FLASH_BUTTON -1
  323. #include <FS.h>
  324. #include <functional>
  325. #include <LinkedList.h>
  326. #include "SPIFFS.h"
  327. #include "Assets.h"
  328. #endif
  329. //// END SCREEN STUFF
  330. #endif