Fork of the espurna firmware for `mhsw` switches
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

179 lines
5.4 KiB

  1. // -----------------------------------------------------------------------------
  2. // Development boards
  3. // -----------------------------------------------------------------------------
  4. #if defined(NODEMCUV2)
  5. #define MANUFACTURER "NODEMCU"
  6. #define DEVICE "LOLIN"
  7. #define BUTTON1_PIN 0
  8. #define RELAY1_PIN 12
  9. #define RELAY1_PIN_INVERSE 0
  10. #define LED1_PIN 2
  11. #define LED1_PIN_INVERSE 1
  12. #elif defined(D1_RELAYSHIELD)
  13. #define MANUFACTURER "WEMOS"
  14. #define DEVICE "D1_MINI"
  15. #define RELAY1_PIN 5
  16. #define RELAY1_PIN_INVERSE 0
  17. #define LED1_PIN 2
  18. #define LED1_PIN_INVERSE 1
  19. // -----------------------------------------------------------------------------
  20. // Itead Studio boards
  21. // -----------------------------------------------------------------------------
  22. #elif defined(SONOFF)
  23. #define MANUFACTURER "ITEAD"
  24. #define DEVICE "SONOFF"
  25. #define BUTTON1_PIN 0
  26. #define RELAY1_PIN 12
  27. #define RELAY1_PIN_INVERSE 0
  28. #define LED1_PIN 13
  29. #define LED1_PIN_INVERSE 1
  30. #elif defined(SONOFF_TH)
  31. #define MANUFACTURER "ITEAD"
  32. #define DEVICE "SONOFF_TH"
  33. #define BUTTON1_PIN 0
  34. #define RELAY1_PIN 12
  35. #define RELAY1_PIN_INVERSE 0
  36. #define LED1_PIN 13
  37. #define LED1_PIN_INVERSE 1
  38. #elif defined(SONOFF_SV)
  39. #define MANUFACTURER "ITEAD"
  40. #define DEVICE "SONOFF_SV"
  41. #define BUTTON1_PIN 0
  42. #define RELAY1_PIN 12
  43. #define RELAY1_PIN_INVERSE 0
  44. #define LED1_PIN 13
  45. #define LED1_PIN_INVERSE 1
  46. #elif defined(SLAMPHER)
  47. #define MANUFACTURER "ITEAD"
  48. #define DEVICE "SLAMPHER"
  49. #define BUTTON1_PIN 0
  50. #define RELAY1_PIN 12
  51. #define RELAY1_PIN_INVERSE 0
  52. #define LED1_PIN 13
  53. #define LED1_PIN_INVERSE 1
  54. #elif defined(S20)
  55. #define MANUFACTURER "ITEAD"
  56. #define DEVICE "S20"
  57. #define BUTTON1_PIN 0
  58. #define RELAY1_PIN 12
  59. #define RELAY1_PIN_INVERSE 0
  60. #define LED1_PIN 13
  61. #define LED1_PIN_INVERSE 1
  62. #elif defined(SONOFF_TOUCH)
  63. #define MANUFACTURER "ITEAD"
  64. #define DEVICE "SONOFF_TOUCH"
  65. #define BUTTON1_PIN 0
  66. #define RELAY1_PIN 12
  67. #define RELAY1_PIN_INVERSE 0
  68. #define LED1_PIN 13
  69. #define LED1_PIN_INVERSE 1
  70. #elif defined(SONOFF_POW)
  71. #define MANUFACTURER "ITEAD"
  72. #define DEVICE "SONOFF_POW"
  73. #define BUTTON1_PIN 0
  74. #define RELAY1_PIN 12
  75. #define RELAY1_PIN_INVERSE 0
  76. #define LED1_PIN 15
  77. #define LED1_PIN_INVERSE 0
  78. #define ENABLE_POW 1
  79. #elif defined(SONOFF_DUAL)
  80. #define MANUFACTURER "ITEAD"
  81. #define DEVICE "SONOFF_DUAL"
  82. #define BUTTON1_PIN 0
  83. #define LED1_PIN 13
  84. #define LED1_PIN_INVERSE 1
  85. #undef SERIAL_BAUDRATE
  86. #define SERIAL_BAUDRATE 19230
  87. #elif defined(SONOFF_4CH)
  88. #define MANUFACTURER "ITEAD"
  89. #define DEVICE "SONOFF_4CH"
  90. #define BUTTON1_PIN 0
  91. #define BUTTON2_PIN 9
  92. #define BUTTON3_PIN 10
  93. #define BUTTON4_PIN 14
  94. #define RELAY1_PIN 12
  95. #define RELAY1_PIN_INVERSE 0
  96. #define RELAY2_PIN 5
  97. #define RELAY2_PIN_INVERSE 0
  98. #define RELAY3_PIN 4
  99. #define RELAY3_PIN_INVERSE 0
  100. #define RELAY4_PIN 15
  101. #define RELAY4_PIN_INVERSE 0
  102. #define LED1_PIN 13
  103. #define LED1_PIN_INVERSE 1
  104. // -----------------------------------------------------------------------------
  105. // Electrodragon boards
  106. // -----------------------------------------------------------------------------
  107. #elif defined(ESP_RELAY_BOARD)
  108. #define MANUFACTURER "ELECTRODRAGON"
  109. #define DEVICE "ESP_RELAY_BOARD"
  110. #define BUTTON1_PIN 0
  111. #define BUTTON2_PIN 2
  112. #define RELAY1_PIN 12
  113. #define RELAY1_PIN_INVERSE 0
  114. #define RELAY2_PIN 13
  115. #define RELAY2_PIN_INVERSE 0
  116. #define LED1_PIN 16
  117. #define LED1_PIN_INVERSE 0
  118. // -----------------------------------------------------------------------------
  119. // WorkChoice ecoPlug
  120. // -----------------------------------------------------------------------------
  121. #elif defined(ECOPLUG)
  122. #define MANUFACTURER "WORKCHOICE"
  123. #define DEVICE "ECOPLUG"
  124. #define BUTTON1_PIN 13
  125. #define RELAY1_PIN 15
  126. #define RELAY1_PIN_INVERSE 0
  127. #define LED1_PIN 2
  128. #define LED1_PIN_INVERSE 0
  129. // -----------------------------------------------------------------------------
  130. // ESPurna board (still beta)
  131. // -----------------------------------------------------------------------------
  132. #elif defined(ESPURNA)
  133. #define MANUFACTURER "TINKERMAN"
  134. #define DEVICE "ESPURNA"
  135. #define BUTTON1_PIN 0
  136. #define RELAY1_PIN 12
  137. #define RELAY1_PIN_INVERSE 0
  138. #define LED1_PIN 13
  139. #define LED1_PIN_INVERSE 0
  140. // -----------------------------------------------------------------------------
  141. // Unknown hardware
  142. // -----------------------------------------------------------------------------
  143. #else
  144. #error "UNSUPPORTED HARDWARE!"
  145. #endif