configs.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. #ifndef configs_h
  2. #define configs_h
  3. #define POLISH_POTATO
  4. //#define MARAUDER_MINI
  5. #define MARAUDER_V4
  6. #define MARAUDER_VERSION "v0.9.6"
  7. //// BUTTON DEFINITIONS
  8. #ifdef MARAUDER_MINI
  9. #define L_BTN 13
  10. #define C_BTN 34
  11. #define U_BTN 36
  12. #define R_BTN 39
  13. #define D_BTN 35
  14. #endif
  15. #ifdef MARAUDER_V4
  16. #endif
  17. //// END BUTTON DEFINITIONS
  18. //// DISPLAY DEFINITIONS
  19. #ifdef MARAUDER_V4
  20. #define BANNER_TEXT_SIZE 2
  21. #ifndef TFT_WIDTH
  22. #define TFT_WIDTH 240
  23. #endif
  24. #ifndef TFT_HEIGHT
  25. #define TFT_HEIGHT 320
  26. #endif
  27. #define TFT_SHIELD
  28. #define SCREEN_WIDTH TFT_WIDTH
  29. #define SCREEN_HEIGHT TFT_HEIGHT
  30. #define HEIGHT_1 TFT_WIDTH
  31. #define WIDTH_1 TFT_HEIGHT
  32. #define STANDARD_FONT_CHAR_LIMIT (TFT_WIDTH/6) // number of characters on a single line with normal font
  33. #define TEXT_HEIGHT 16 // Height of text to be printed and scrolled
  34. #define BOT_FIXED_AREA 0 // Number of lines in bottom fixed area (lines counted from bottom of screen)
  35. #define TOP_FIXED_AREA 48 // Number of lines in top fixed area (lines counted from top of screen)
  36. #define YMAX 320 // Bottom of screen area
  37. #define minimum(a,b) (((a) < (b)) ? (a) : (b))
  38. //#define MENU_FONT NULL
  39. #define MENU_FONT &FreeMono9pt7b // Winner
  40. //#define MENU_FONT &FreeMonoBold9pt7b
  41. //#define MENU_FONT &FreeSans9pt7b
  42. //#define MENU_FONT &FreeSansBold9pt7b
  43. #define BUTTON_ARRAY_LEN 9
  44. #define STATUS_BAR_WIDTH 16
  45. #define LVGL_TICK_PERIOD 6
  46. #define FRAME_X 100
  47. #define FRAME_Y 64
  48. #define FRAME_W 120
  49. #define FRAME_H 50
  50. // Red zone size
  51. #define REDBUTTON_X FRAME_X
  52. #define REDBUTTON_Y FRAME_Y
  53. #define REDBUTTON_W (FRAME_W/2)
  54. #define REDBUTTON_H FRAME_H
  55. // Green zone size
  56. #define GREENBUTTON_X (REDBUTTON_X + REDBUTTON_W)
  57. #define GREENBUTTON_Y FRAME_Y
  58. #define GREENBUTTON_W (FRAME_W/2)
  59. #define GREENBUTTON_H FRAME_H
  60. #define STATUSBAR_COLOR 0x4A49
  61. #define KIT_LED_BUILTIN 13
  62. #endif
  63. #ifdef MARAUDER_MINI
  64. #define TFT_MISO 19
  65. #define TFT_MOSI 23
  66. #define TFT_SCLK 18
  67. #define TFT_CS 27
  68. #define TFT_DC 26
  69. #define TFT_RST 5
  70. #define TFT_BL 32
  71. #define TOUCH_CS 21
  72. #define SD_CS 4
  73. #define BANNER_TEXT_SIZE 1
  74. #ifndef TFT_WIDTH
  75. #define TFT_WIDTH 128
  76. #endif
  77. #ifndef TFT_HEIGHT
  78. #define TFT_HEIGHT 128
  79. #endif
  80. #define SCREEN_WIDTH TFT_WIDTH // Originally 240
  81. #define SCREEN_HEIGHT TFT_HEIGHT // Originally 320
  82. #define HEIGHT_1 TFT_WIDTH
  83. #define WIDTH_1 TFT_WIDTH
  84. #define STANDARD_FONT_CHAR_LIMIT (TFT_WIDTH/6) // number of characters on a single line with normal font
  85. #define TEXT_HEIGHT (TFT_HEIGHT/10) // 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 TFT_HEIGHT // 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 9
  96. #define STATUS_BAR_WIDTH (TFT_HEIGHT/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. #endif
  114. //// END DISPLAY DEFINITIONS
  115. //// MENU DEFINITIONS
  116. #ifdef MARAUDER_V4
  117. #define BANNER_TIME 100
  118. #define COMMAND_PREFIX "!"
  119. // Keypad start position, key sizes and spacing
  120. #define KEY_X 120 // Centre of key
  121. #define KEY_Y 50
  122. #define KEY_W 240 // Width and height
  123. #define KEY_H 22
  124. #define KEY_SPACING_X 0 // X and Y gap
  125. #define KEY_SPACING_Y 1
  126. #define KEY_TEXTSIZE 1 // Font size multiplier
  127. #define ICON_W 22
  128. #define ICON_H 22
  129. #define BUTTON_PADDING 22
  130. //#define BUTTON_ARRAY_LEN 5
  131. #endif
  132. #ifdef MARAUDER_MINI
  133. #define BANNER_TIME 50
  134. #define COMMAND_PREFIX "!"
  135. // Keypad start position, key sizes and spacing
  136. #define KEY_X (TFT_WIDTH/2) // Centre of key
  137. #define KEY_Y (TFT_HEIGHT/4.5)
  138. #define KEY_W TFT_WIDTH // Width and height
  139. #define KEY_H (TFT_HEIGHT/12.8)
  140. #define KEY_SPACING_X 0 // X and Y gap
  141. #define KEY_SPACING_Y 1
  142. #define KEY_TEXTSIZE 1 // Font size multiplier
  143. #define ICON_W 22
  144. #define ICON_H 22
  145. #define BUTTON_PADDING 10
  146. #endif
  147. //// END MENU DEFINITIONS
  148. //// SD DEFINITIONS
  149. #ifdef MARAUDER_V4
  150. #define SD_CS 12
  151. #endif
  152. #ifdef MARAUDER_MINI
  153. #define SD_CS 4
  154. #endif
  155. //// END SD DEFINITIONS
  156. #endif