configs.h 5.1 KB

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