configs.h 5.0 KB

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