GirsFat.config.h 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. /**
  2. * @file GirsFat.config.h
  3. * @brief Complete configuration options.
  4. */
  5. #pragma once
  6. /**
  7. * Program name, as displayed in greeting messages etc.
  8. */
  9. #define PROGNAME "AGirs"
  10. // Define Girs modules to implement, see http://www.harctoolbox.org/Girs.html
  11. /**
  12. * Define to support transmission of IR signals. Requires IR LEDs.
  13. */
  14. #define TRANSMIT
  15. /**
  16. * Define to support the rendering of some known protocols, presently NEC1 and RC5.
  17. */
  18. #define RENDERER
  19. /**
  20. * Define to support capturing of IR signals.
  21. * Requires non-demodulating IR sensor (TSMP58000, QSE159, etc).
  22. */
  23. #define CAPTURE
  24. /**
  25. * Define to support reception of demodulated IR signals.
  26. * Require demodulating IR sensor (TSMP* or equivalent).
  27. */
  28. #define RECEIVE
  29. /**
  30. * Define to support decoding of the received signal.
  31. */
  32. #define DECODER
  33. /**
  34. * Define to support blinking with LED according to decoding outcome.
  35. */
  36. #define DECODELED
  37. /**
  38. * Define to support an LCD display with I2C connection. Defines a command "lcd".
  39. */
  40. #define LCD
  41. /**
  42. * Define to use signaling LEDs. Defines command "led".
  43. */
  44. #define LED
  45. /**
  46. * Define to allow to change the parameters, like timeouts.
  47. * Defines command "parameters". The Lirc driver uses this, if available.
  48. */
  49. #define PARAMETERS
  50. /**
  51. * Define to support commands called by names, grouped in sets, "remotes".
  52. * (Not yet implemented.)
  53. */
  54. #ifdef DOXYGEN
  55. #define NAMED_COMMANDS
  56. #endif
  57. //#define NAMED_COMMANDS
  58. /**
  59. * Define to have the receive command report the durations, even if DECODE is defined
  60. * and a decode was found.
  61. * Use this for Lirc.
  62. */
  63. #define DONT_REPORT_DECODES
  64. /**
  65. * Define to be able to reconfigure signaling LEDs during runtime.
  66. * Have parameters for transmitled etc.
  67. */
  68. #define CONFIGURABLE_LEDS
  69. /**
  70. * Define to support sending signals without modulation, e.g. with RF module.
  71. */
  72. #define NON_MOD
  73. /**
  74. * Define to support a reset command, Experimental!!
  75. */
  76. #define RESET
  77. /**
  78. * Define to support command "memory", reporting free (SRAM) memory.
  79. */
  80. #define FREEMEM
  81. /**
  82. * Define to support command "info".
  83. */
  84. #define INFO
  85. /**
  86. * Define to support command "hex", sending Pronto hex signals.
  87. */
  88. #define PRONTO
  89. #ifdef LED
  90. #ifdef TRANSMIT
  91. /**
  92. * Number of logical LED to light when transmission takings place.
  93. */
  94. #define TRANSMITLED 8
  95. //#define TRANSMITLED 4
  96. #endif
  97. #ifdef RECEIVE
  98. /**
  99. * Number of logical LED to light when waiting for reception.
  100. */
  101. #define RECEIVELED 7
  102. //#define RECEIVELED 3
  103. #endif
  104. #ifdef CAPTURE
  105. /**
  106. * Number of logical LED to light when waiting for capture.
  107. */
  108. #define CAPTURELED 6
  109. //#define CAPTURELED 2
  110. #endif
  111. /**
  112. * Number of logical LED to light when waiting for command.
  113. */
  114. #define COMMANDLED 5
  115. //#define COMMANDLED 1
  116. #endif // LED
  117. /**
  118. * Define to use Ethernet (TCP) as the communication channel.
  119. */
  120. #define ETHERNET
  121. // Print received commands on the LCD display
  122. //#define DEBUG_CMD
  123. #ifdef ETHERNET
  124. /**
  125. * Define to print some debug messages on the serial port when using Ethernet.
  126. */
  127. #define SERIAL_DEBUG
  128. /**
  129. * Pin to disable (put low) on Ethernet shield.
  130. */
  131. #define SDCARD_ON_ETHERSHIELD_PIN 4
  132. /**
  133. * Define to do IP configuration using DHCP.
  134. * Is rumored to consume rather much memory.
  135. */
  136. #define DHCP
  137. /**
  138. * Define to invoke a AMX style beacon.
  139. * Requires the Beacon library (https://github.com/bengtmartensson/ABeacon).
  140. * For the time being, no-one takes advantage of this.
  141. */
  142. #ifdef DOXYGEN
  143. #define BEACON
  144. #endif
  145. //#define BEACON
  146. #endif // ETHERNET
  147. // Hardware configuration
  148. #ifdef ETHERNET
  149. /**
  150. * Must define MAC-Address to use here (!!).
  151. */
  152. #define MACADDRESS 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
  153. #ifndef DHCP
  154. #define IPADDRESS 192,168,1,29
  155. #define GATEWAY 192,168,1,254
  156. #define DNSSERVER 192,168,1,4
  157. #define SUBNETMASK 255,255,255,0
  158. #endif // ! DHCP
  159. /**
  160. * TCP port to use.
  161. */
  162. #define PORT 33333
  163. #endif // ETHERNET
  164. /**
  165. * Character that ends the command lines.
  166. */
  167. #define EOLCHAR '\r'
  168. // Hardware configuration
  169. // Define an LCD symbol to use, if desired.
  170. #ifdef LCD
  171. /**
  172. * Define to use LCD display at I2C address 0x3F,
  173. * 4 lines, 20 columns.
  174. */
  175. #define LCD_0x3F_20_4
  176. /**
  177. * Define to use LCD display at I2C address 0x27,
  178. * 4 lines, 20 columns.
  179. */
  180. #ifdef DOXYGEN
  181. #define LCD_0x27_20_4
  182. #endif
  183. //#define LCD_0x27_20_4
  184. /**
  185. * Define to use LCD display at I2C address 0x27,
  186. * 2 lines, 16 columns.
  187. */
  188. #ifdef DOXYGEN
  189. #define LCD_0x27_16_2
  190. #endif
  191. //#define LCD_0x27_16_2
  192. #endif // LCD
  193. // Include one file describing the pin configuration
  194. // Use one of the provided, or write your own.
  195. #include <girs_hw_config.h> // Generic
  196. #if defined(ARDUINO_AVR_MEGA2560)
  197. #define LARGE_RAM
  198. #endif
  199. // Without PARAMETERS, these are really not defaults,
  200. // they are the non-changeable values.
  201. /**
  202. * Time to wait for signal to start.
  203. */
  204. #define DEFAULT_BEGINTIMEOUT 10000UL // milliseconds
  205. #ifdef DECODER
  206. /**
  207. * By receive, time to wait before signal is considered ended.
  208. * If using the decoder, be sure to end a capture before the repeat sequence.
  209. */
  210. #define DEFAULT_RECEIVE_ENDINGTIMEOUT 30L // milliseconds
  211. #else
  212. #define DEFAULT_RECEIVE_ENDINGTIMEOUT 50L // milliseconds
  213. #endif
  214. #ifdef CAPTURE
  215. /**
  216. * By capture, time to wait before signal is considered ended.
  217. */
  218. #define DEFAULT_CAPTURE_ENDINGTIMEOUT 100L // milliseconds
  219. #endif
  220. /**
  221. * Size of capture and receive arrays.
  222. */
  223. #if defined(CAPTURE) | defined(RECEIVE)
  224. #ifdef LARGE_RAM
  225. #define DEFAULT_CAPTURESIZE 500U // must be even
  226. #else
  227. #define DEFAULT_CAPTURESIZE 400U // must be even
  228. #endif
  229. #endif
  230. #ifdef RECEIVE
  231. /**
  232. * This quantity is added to all gaps and subtracted from all marks when receiving.
  233. */
  234. #define IRRECEIVER_MARK_EXCESS 50
  235. #endif
  236. #ifdef CAPTURE
  237. /**
  238. * This quantity is added to all gaps and subtracted from all marks when capturing.
  239. */
  240. #define IRSENSOR_MARK_EXCESS -10
  241. #endif
  242. #if !defined(ETHERNET) | defined(SERIAL_DEBUG)
  243. /**
  244. * Configured speed of the serial port.
  245. */
  246. #define SERIALBAUD 115200
  247. /**
  248. * Timeout for serial line.
  249. */
  250. #define SERIALTIMEOUT 5000L
  251. #endif // !defined(ETHERNET) | defined(SERIAL_DEBUG)