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.

710 lines
17 KiB

  1. // -----------------------------------------------------------------------------
  2. // Buttons
  3. // -----------------------------------------------------------------------------
  4. #ifndef BUTTON1_PIN
  5. #define BUTTON1_PIN GPIO_NONE
  6. #endif
  7. #ifndef BUTTON2_PIN
  8. #define BUTTON2_PIN GPIO_NONE
  9. #endif
  10. #ifndef BUTTON3_PIN
  11. #define BUTTON3_PIN GPIO_NONE
  12. #endif
  13. #ifndef BUTTON4_PIN
  14. #define BUTTON4_PIN GPIO_NONE
  15. #endif
  16. #ifndef BUTTON5_PIN
  17. #define BUTTON5_PIN GPIO_NONE
  18. #endif
  19. #ifndef BUTTON6_PIN
  20. #define BUTTON6_PIN GPIO_NONE
  21. #endif
  22. #ifndef BUTTON7_PIN
  23. #define BUTTON7_PIN GPIO_NONE
  24. #endif
  25. #ifndef BUTTON8_PIN
  26. #define BUTTON8_PIN GPIO_NONE
  27. #endif
  28. #ifndef BUTTON1_MODE
  29. #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  30. #endif
  31. #ifndef BUTTON2_MODE
  32. #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  33. #endif
  34. #ifndef BUTTON3_MODE
  35. #define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  36. #endif
  37. #ifndef BUTTON4_MODE
  38. #define BUTTON4_MODE BUTTON_PUSHBUTTON | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  39. #endif
  40. #ifndef BUTTON5_MODE
  41. #define BUTTON5_MODE BUTTON_PUSHBUTTON | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  42. #endif
  43. #ifndef BUTTON6_MODE
  44. #define BUTTON6_MODE BUTTON_PUSHBUTTON | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  45. #endif
  46. #ifndef BUTTON7_MODE
  47. #define BUTTON7_MODE BUTTON_PUSHBUTTON | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  48. #endif
  49. #ifndef BUTTON8_MODE
  50. #define BUTTON8_MODE BUTTON_PUSHBUTTON | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
  51. #endif
  52. #ifndef BUTTON1_PRESS
  53. #define BUTTON1_PRESS BUTTON_MODE_NONE
  54. #endif
  55. #ifndef BUTTON2_PRESS
  56. #define BUTTON2_PRESS BUTTON_MODE_NONE
  57. #endif
  58. #ifndef BUTTON3_PRESS
  59. #define BUTTON3_PRESS BUTTON_MODE_NONE
  60. #endif
  61. #ifndef BUTTON4_PRESS
  62. #define BUTTON4_PRESS BUTTON_MODE_NONE
  63. #endif
  64. #ifndef BUTTON5_PRESS
  65. #define BUTTON5_PRESS BUTTON_MODE_NONE
  66. #endif
  67. #ifndef BUTTON6_PRESS
  68. #define BUTTON6_PRESS BUTTON_MODE_NONE
  69. #endif
  70. #ifndef BUTTON7_PRESS
  71. #define BUTTON7_PRESS BUTTON_MODE_NONE
  72. #endif
  73. #ifndef BUTTON8_PRESS
  74. #define BUTTON8_PRESS BUTTON_MODE_NONE
  75. #endif
  76. #ifndef BUTTON1_CLICK
  77. #define BUTTON1_CLICK BUTTON_MODE_TOGGLE
  78. #endif
  79. #ifndef BUTTON2_CLICK
  80. #define BUTTON2_CLICK BUTTON_MODE_TOGGLE
  81. #endif
  82. #ifndef BUTTON3_CLICK
  83. #define BUTTON3_CLICK BUTTON_MODE_TOGGLE
  84. #endif
  85. #ifndef BUTTON4_CLICK
  86. #define BUTTON4_CLICK BUTTON_MODE_TOGGLE
  87. #endif
  88. #ifndef BUTTON5_CLICK
  89. #define BUTTON5_CLICK BUTTON_MODE_TOGGLE
  90. #endif
  91. #ifndef BUTTON6_CLICK
  92. #define BUTTON6_CLICK BUTTON_MODE_TOGGLE
  93. #endif
  94. #ifndef BUTTON7_CLICK
  95. #define BUTTON7_CLICK BUTTON_MODE_TOGGLE
  96. #endif
  97. #ifndef BUTTON8_CLICK
  98. #define BUTTON8_CLICK BUTTON_MODE_TOGGLE
  99. #endif
  100. #ifndef BUTTON1_DBLCLICK
  101. #define BUTTON1_DBLCLICK BUTTON_MODE_AP
  102. #endif
  103. #ifndef BUTTON2_DBLCLICK
  104. #define BUTTON2_DBLCLICK BUTTON_MODE_NONE
  105. #endif
  106. #ifndef BUTTON3_DBLCLICK
  107. #define BUTTON3_DBLCLICK BUTTON_MODE_NONE
  108. #endif
  109. #ifndef BUTTON4_DBLCLICK
  110. #define BUTTON4_DBLCLICK BUTTON_MODE_NONE
  111. #endif
  112. #ifndef BUTTON5_DBLCLICK
  113. #define BUTTON5_DBLCLICK BUTTON_MODE_NONE
  114. #endif
  115. #ifndef BUTTON6_DBLCLICK
  116. #define BUTTON6_DBLCLICK BUTTON_MODE_NONE
  117. #endif
  118. #ifndef BUTTON7_DBLCLICK
  119. #define BUTTON7_DBLCLICK BUTTON_MODE_NONE
  120. #endif
  121. #ifndef BUTTON8_DBLCLICK
  122. #define BUTTON8_DBLCLICK BUTTON_MODE_NONE
  123. #endif
  124. #ifndef BUTTON1_TRIPLECLICK
  125. #define BUTTON1_TRIPLECLICK BUTTON_MODE_SMART_CONFIG
  126. #endif
  127. #ifndef BUTTON2_TRIPLECLICK
  128. #define BUTTON2_TRIPLECLICK BUTTON_MODE_NONE
  129. #endif
  130. #ifndef BUTTON3_TRIPLECLICK
  131. #define BUTTON3_TRIPLECLICK BUTTON_MODE_NONE
  132. #endif
  133. #ifndef BUTTON4_TRIPLECLICK
  134. #define BUTTON4_TRIPLECLICK BUTTON_MODE_NONE
  135. #endif
  136. #ifndef BUTTON5_TRIPLECLICK
  137. #define BUTTON5_TRIPLECLICK BUTTON_MODE_NONE
  138. #endif
  139. #ifndef BUTTON6_TRIPLECLICK
  140. #define BUTTON6_TRIPLECLICK BUTTON_MODE_NONE
  141. #endif
  142. #ifndef BUTTON7_TRIPLECLICK
  143. #define BUTTON7_TRIPLECLICK BUTTON_MODE_NONE
  144. #endif
  145. #ifndef BUTTON8_TRIPLECLICK
  146. #define BUTTON8_TRIPLECLICK BUTTON_MODE_NONE
  147. #endif
  148. #ifndef BUTTON1_LNGCLICK
  149. #define BUTTON1_LNGCLICK BUTTON_MODE_RESET
  150. #endif
  151. #ifndef BUTTON2_LNGCLICK
  152. #define BUTTON2_LNGCLICK BUTTON_MODE_NONE
  153. #endif
  154. #ifndef BUTTON3_LNGCLICK
  155. #define BUTTON3_LNGCLICK BUTTON_MODE_NONE
  156. #endif
  157. #ifndef BUTTON4_LNGCLICK
  158. #define BUTTON4_LNGCLICK BUTTON_MODE_NONE
  159. #endif
  160. #ifndef BUTTON5_LNGCLICK
  161. #define BUTTON5_LNGCLICK BUTTON_MODE_NONE
  162. #endif
  163. #ifndef BUTTON6_LNGCLICK
  164. #define BUTTON6_LNGCLICK BUTTON_MODE_NONE
  165. #endif
  166. #ifndef BUTTON7_LNGCLICK
  167. #define BUTTON7_LNGCLICK BUTTON_MODE_NONE
  168. #endif
  169. #ifndef BUTTON8_LNGCLICK
  170. #define BUTTON8_LNGCLICK BUTTON_MODE_NONE
  171. #endif
  172. #ifndef BUTTON1_LNGLNGCLICK
  173. #define BUTTON1_LNGLNGCLICK BUTTON_MODE_FACTORY
  174. #endif
  175. #ifndef BUTTON2_LNGLNGCLICK
  176. #define BUTTON2_LNGLNGCLICK BUTTON_MODE_NONE
  177. #endif
  178. #ifndef BUTTON3_LNGLNGCLICK
  179. #define BUTTON3_LNGLNGCLICK BUTTON_MODE_NONE
  180. #endif
  181. #ifndef BUTTON4_LNGLNGCLICK
  182. #define BUTTON4_LNGLNGCLICK BUTTON_MODE_NONE
  183. #endif
  184. #ifndef BUTTON5_LNGLNGCLICK
  185. #define BUTTON5_LNGLNGCLICK BUTTON_MODE_NONE
  186. #endif
  187. #ifndef BUTTON6_LNGLNGCLICK
  188. #define BUTTON6_LNGLNGCLICK BUTTON_MODE_NONE
  189. #endif
  190. #ifndef BUTTON7_LNGLNGCLICK
  191. #define BUTTON7_LNGLNGCLICK BUTTON_MODE_NONE
  192. #endif
  193. #ifndef BUTTON8_LNGLNGCLICK
  194. #define BUTTON8_LNGLNGCLICK BUTTON_MODE_NONE
  195. #endif
  196. #ifndef BUTTON1_RELAY
  197. #define BUTTON1_RELAY RELAY_NONE
  198. #endif
  199. #ifndef BUTTON2_RELAY
  200. #define BUTTON2_RELAY RELAY_NONE
  201. #endif
  202. #ifndef BUTTON3_RELAY
  203. #define BUTTON3_RELAY RELAY_NONE
  204. #endif
  205. #ifndef BUTTON4_RELAY
  206. #define BUTTON4_RELAY RELAY_NONE
  207. #endif
  208. #ifndef BUTTON5_RELAY
  209. #define BUTTON5_RELAY RELAY_NONE
  210. #endif
  211. #ifndef BUTTON6_RELAY
  212. #define BUTTON6_RELAY RELAY_NONE
  213. #endif
  214. #ifndef BUTTON7_RELAY
  215. #define BUTTON7_RELAY RELAY_NONE
  216. #endif
  217. #ifndef BUTTON8_RELAY
  218. #define BUTTON8_RELAY RELAY_NONE
  219. #endif
  220. // -----------------------------------------------------------------------------
  221. // Encoders
  222. // -----------------------------------------------------------------------------
  223. #ifndef ENCODER1_PIN1
  224. #define ENCODER1_PIN1 GPIO_NONE
  225. #endif
  226. #ifndef ENCODER2_PIN1
  227. #define ENCODER2_PIN1 GPIO_NONE
  228. #endif
  229. #ifndef ENCODER3_PIN1
  230. #define ENCODER3_PIN1 GPIO_NONE
  231. #endif
  232. #ifndef ENCODER4_PIN1
  233. #define ENCODER4_PIN1 GPIO_NONE
  234. #endif
  235. #ifndef ENCODER5_PIN1
  236. #define ENCODER5_PIN1 GPIO_NONE
  237. #endif
  238. #ifndef ENCODER1_PIN2
  239. #define ENCODER1_PIN2 GPIO_NONE
  240. #endif
  241. #ifndef ENCODER2_PIN2
  242. #define ENCODER2_PIN2 GPIO_NONE
  243. #endif
  244. #ifndef ENCODER3_PIN2
  245. #define ENCODER3_PIN2 GPIO_NONE
  246. #endif
  247. #ifndef ENCODER4_PIN2
  248. #define ENCODER4_PIN2 GPIO_NONE
  249. #endif
  250. #ifndef ENCODER5_PIN2
  251. #define ENCODER5_PIN2 GPIO_NONE
  252. #endif
  253. #ifndef ENCODER1_BUTTON_PIN
  254. #define ENCODER1_BUTTON_PIN GPIO_NONE
  255. #endif
  256. #ifndef ENCODER2_BUTTON_PIN
  257. #define ENCODER2_BUTTON_PIN GPIO_NONE
  258. #endif
  259. #ifndef ENCODER3_BUTTON_PIN
  260. #define ENCODER3_BUTTON_PIN GPIO_NONE
  261. #endif
  262. #ifndef ENCODER4_BUTTON_PIN
  263. #define ENCODER4_BUTTON_PIN GPIO_NONE
  264. #endif
  265. #ifndef ENCODER5_BUTTON_PIN
  266. #define ENCODER5_BUTTON_PIN GPIO_NONE
  267. #endif
  268. #ifndef ENCODER1_BUTTON_LOGIC
  269. #define ENCODER1_BUTTON_LOGIC HIGH
  270. #endif
  271. #ifndef ENCODER2_BUTTON_LOGIC
  272. #define ENCODER2_BUTTON_LOGIC HIGH
  273. #endif
  274. #ifndef ENCODER3_BUTTON_LOGIC
  275. #define ENCODER3_BUTTON_LOGIC HIGH
  276. #endif
  277. #ifndef ENCODER4_BUTTON_LOGIC
  278. #define ENCODER4_BUTTON_LOGIC HIGH
  279. #endif
  280. #ifndef ENCODER5_BUTTON_LOGIC
  281. #define ENCODER5_BUTTON_LOGIC HIGH
  282. #endif
  283. #ifndef ENCODER1_BUTTON_MODE
  284. #define ENCODER1_BUTTON_MODE INPUT_PULLUP
  285. #endif
  286. #ifndef ENCODER2_BUTTON_MODE
  287. #define ENCODER2_BUTTON_MODE INPUT_PULLUP
  288. #endif
  289. #ifndef ENCODER3_BUTTON_MODE
  290. #define ENCODER3_BUTTON_MODE INPUT_PULLUP
  291. #endif
  292. #ifndef ENCODER4_BUTTON_MODE
  293. #define ENCODER4_BUTTON_MODE INPUT_PULLUP
  294. #endif
  295. #ifndef ENCODER5_BUTTON_MODE
  296. #define ENCODER5_BUTTON_MODE INPUT_PULLUP
  297. #endif
  298. #ifndef ENCODER1_MODE
  299. #define ENCODER1_MODE 1
  300. #endif
  301. #ifndef ENCODER2_MODE
  302. #define ENCODER2_MODE 1
  303. #endif
  304. #ifndef ENCODER3_MODE
  305. #define ENCODER3_MODE 1
  306. #endif
  307. #ifndef ENCODER4_MODE
  308. #define ENCODER4_MODE 1
  309. #endif
  310. #ifndef ENCODER5_MODE
  311. #define ENCODER5_MODE 1
  312. #endif
  313. #ifndef ENCODER1_CHANNEL1
  314. #define ENCODER1_CHANNEL1 0
  315. #endif
  316. #ifndef ENCODER2_CHANNEL1
  317. #define ENCODER2_CHANNEL1 0
  318. #endif
  319. #ifndef ENCODER3_CHANNEL1
  320. #define ENCODER3_CHANNEL1 0
  321. #endif
  322. #ifndef ENCODER4_CHANNEL1
  323. #define ENCODER4_CHANNEL1 0
  324. #endif
  325. #ifndef ENCODER5_CHANNEL1
  326. #define ENCODER5_CHANNEL1 0
  327. #endif
  328. #ifndef ENCODER1_CHANNEL2
  329. #define ENCODER1_CHANNEL2 1
  330. #endif
  331. #ifndef ENCODER2_CHANNEL2
  332. #define ENCODER2_CHANNEL2 1
  333. #endif
  334. #ifndef ENCODER3_CHANNEL2
  335. #define ENCODER3_CHANNEL2 1
  336. #endif
  337. #ifndef ENCODER4_CHANNEL2
  338. #define ENCODER4_CHANNEL2 1
  339. #endif
  340. #ifndef ENCODER5_CHANNEL2
  341. #define ENCODER5_CHANNEL2 1
  342. #endif
  343. // -----------------------------------------------------------------------------
  344. // Relays
  345. // -----------------------------------------------------------------------------
  346. #ifndef DUMMY_RELAY_COUNT
  347. #define DUMMY_RELAY_COUNT 0
  348. #endif
  349. #ifndef RELAY1_PIN
  350. #define RELAY1_PIN GPIO_NONE
  351. #endif
  352. #ifndef RELAY2_PIN
  353. #define RELAY2_PIN GPIO_NONE
  354. #endif
  355. #ifndef RELAY3_PIN
  356. #define RELAY3_PIN GPIO_NONE
  357. #endif
  358. #ifndef RELAY4_PIN
  359. #define RELAY4_PIN GPIO_NONE
  360. #endif
  361. #ifndef RELAY5_PIN
  362. #define RELAY5_PIN GPIO_NONE
  363. #endif
  364. #ifndef RELAY6_PIN
  365. #define RELAY6_PIN GPIO_NONE
  366. #endif
  367. #ifndef RELAY7_PIN
  368. #define RELAY7_PIN GPIO_NONE
  369. #endif
  370. #ifndef RELAY8_PIN
  371. #define RELAY8_PIN GPIO_NONE
  372. #endif
  373. #ifndef RELAY1_TYPE
  374. #define RELAY1_TYPE RELAY_TYPE_NORMAL
  375. #endif
  376. #ifndef RELAY2_TYPE
  377. #define RELAY2_TYPE RELAY_TYPE_NORMAL
  378. #endif
  379. #ifndef RELAY3_TYPE
  380. #define RELAY3_TYPE RELAY_TYPE_NORMAL
  381. #endif
  382. #ifndef RELAY4_TYPE
  383. #define RELAY4_TYPE RELAY_TYPE_NORMAL
  384. #endif
  385. #ifndef RELAY5_TYPE
  386. #define RELAY5_TYPE RELAY_TYPE_NORMAL
  387. #endif
  388. #ifndef RELAY6_TYPE
  389. #define RELAY6_TYPE RELAY_TYPE_NORMAL
  390. #endif
  391. #ifndef RELAY7_TYPE
  392. #define RELAY7_TYPE RELAY_TYPE_NORMAL
  393. #endif
  394. #ifndef RELAY8_TYPE
  395. #define RELAY8_TYPE RELAY_TYPE_NORMAL
  396. #endif
  397. #ifndef RELAY1_RESET_PIN
  398. #define RELAY1_RESET_PIN GPIO_NONE
  399. #endif
  400. #ifndef RELAY2_RESET_PIN
  401. #define RELAY2_RESET_PIN GPIO_NONE
  402. #endif
  403. #ifndef RELAY3_RESET_PIN
  404. #define RELAY3_RESET_PIN GPIO_NONE
  405. #endif
  406. #ifndef RELAY4_RESET_PIN
  407. #define RELAY4_RESET_PIN GPIO_NONE
  408. #endif
  409. #ifndef RELAY5_RESET_PIN
  410. #define RELAY5_RESET_PIN GPIO_NONE
  411. #endif
  412. #ifndef RELAY6_RESET_PIN
  413. #define RELAY6_RESET_PIN GPIO_NONE
  414. #endif
  415. #ifndef RELAY7_RESET_PIN
  416. #define RELAY7_RESET_PIN GPIO_NONE
  417. #endif
  418. #ifndef RELAY8_RESET_PIN
  419. #define RELAY8_RESET_PIN GPIO_NONE
  420. #endif
  421. #ifndef RELAY1_DELAY_ON
  422. #define RELAY1_DELAY_ON 0
  423. #endif
  424. #ifndef RELAY2_DELAY_ON
  425. #define RELAY2_DELAY_ON 0
  426. #endif
  427. #ifndef RELAY3_DELAY_ON
  428. #define RELAY3_DELAY_ON 0
  429. #endif
  430. #ifndef RELAY4_DELAY_ON
  431. #define RELAY4_DELAY_ON 0
  432. #endif
  433. #ifndef RELAY5_DELAY_ON
  434. #define RELAY5_DELAY_ON 0
  435. #endif
  436. #ifndef RELAY6_DELAY_ON
  437. #define RELAY6_DELAY_ON 0
  438. #endif
  439. #ifndef RELAY7_DELAY_ON
  440. #define RELAY7_DELAY_ON 0
  441. #endif
  442. #ifndef RELAY8_DELAY_ON
  443. #define RELAY8_DELAY_ON 0
  444. #endif
  445. #ifndef RELAY1_DELAY_OFF
  446. #define RELAY1_DELAY_OFF 0
  447. #endif
  448. #ifndef RELAY2_DELAY_OFF
  449. #define RELAY2_DELAY_OFF 0
  450. #endif
  451. #ifndef RELAY3_DELAY_OFF
  452. #define RELAY3_DELAY_OFF 0
  453. #endif
  454. #ifndef RELAY4_DELAY_OFF
  455. #define RELAY4_DELAY_OFF 0
  456. #endif
  457. #ifndef RELAY5_DELAY_OFF
  458. #define RELAY5_DELAY_OFF 0
  459. #endif
  460. #ifndef RELAY6_DELAY_OFF
  461. #define RELAY6_DELAY_OFF 0
  462. #endif
  463. #ifndef RELAY7_DELAY_OFF
  464. #define RELAY7_DELAY_OFF 0
  465. #endif
  466. #ifndef RELAY8_DELAY_OFF
  467. #define RELAY8_DELAY_OFF 0
  468. #endif
  469. #ifndef RELAY_DELAY_INTERLOCK
  470. #define RELAY_DELAY_INTERLOCK 0
  471. #endif
  472. // -----------------------------------------------------------------------------
  473. // LEDs
  474. // -----------------------------------------------------------------------------
  475. #ifndef LED1_PIN
  476. #define LED1_PIN GPIO_NONE
  477. #endif
  478. #ifndef LED2_PIN
  479. #define LED2_PIN GPIO_NONE
  480. #endif
  481. #ifndef LED3_PIN
  482. #define LED3_PIN GPIO_NONE
  483. #endif
  484. #ifndef LED4_PIN
  485. #define LED4_PIN GPIO_NONE
  486. #endif
  487. #ifndef LED5_PIN
  488. #define LED5_PIN GPIO_NONE
  489. #endif
  490. #ifndef LED6_PIN
  491. #define LED6_PIN GPIO_NONE
  492. #endif
  493. #ifndef LED7_PIN
  494. #define LED7_PIN GPIO_NONE
  495. #endif
  496. #ifndef LED8_PIN
  497. #define LED8_PIN GPIO_NONE
  498. #endif
  499. #ifndef LED1_MODE
  500. #define LED1_MODE LED_MODE_WIFI
  501. #endif
  502. #ifndef LED2_MODE
  503. #define LED2_MODE LED_MODE_MANUAL
  504. #endif
  505. #ifndef LED3_MODE
  506. #define LED3_MODE LED_MODE_MANUAL
  507. #endif
  508. #ifndef LED4_MODE
  509. #define LED4_MODE LED_MODE_MANUAL
  510. #endif
  511. #ifndef LED5_MODE
  512. #define LED5_MODE LED_MODE_MANUAL
  513. #endif
  514. #ifndef LED6_MODE
  515. #define LED6_MODE LED_MODE_MANUAL
  516. #endif
  517. #ifndef LED7_MODE
  518. #define LED7_MODE LED_MODE_MANUAL
  519. #endif
  520. #ifndef LED8_MODE
  521. #define LED8_MODE LED_MODE_MANUAL
  522. #endif
  523. #ifndef LED1_RELAY
  524. #define LED1_RELAY 1
  525. #endif
  526. #ifndef LED2_RELAY
  527. #define LED2_RELAY 2
  528. #endif
  529. #ifndef LED3_RELAY
  530. #define LED3_RELAY 3
  531. #endif
  532. #ifndef LED4_RELAY
  533. #define LED4_RELAY 4
  534. #endif
  535. #ifndef LED5_RELAY
  536. #define LED5_RELAY 5
  537. #endif
  538. #ifndef LED6_RELAY
  539. #define LED6_RELAY 6
  540. #endif
  541. #ifndef LED7_RELAY
  542. #define LED7_RELAY 7
  543. #endif
  544. #ifndef LED8_RELAY
  545. #define LED8_RELAY 8
  546. #endif
  547. #ifndef LED1_PIN_INVERSE
  548. #define LED1_PIN_INVERSE 0
  549. #endif
  550. #ifndef LED2_PIN_INVERSE
  551. #define LED2_PIN_INVERSE 0
  552. #endif
  553. #ifndef LED3_PIN_INVERSE
  554. #define LED3_PIN_INVERSE 0
  555. #endif
  556. #ifndef LED4_PIN_INVERSE
  557. #define LED4_PIN_INVERSE 0
  558. #endif
  559. #ifndef LED5_PIN_INVERSE
  560. #define LED5_PIN_INVERSE 0
  561. #endif
  562. #ifndef LED6_PIN_INVERSE
  563. #define LED6_PIN_INVERSE 0
  564. #endif
  565. #ifndef LED7_PIN_INVERSE
  566. #define LED7_PIN_INVERSE 0
  567. #endif
  568. #ifndef LED8_PIN_INVERSE
  569. #define LED8_PIN_INVERSE 0
  570. #endif
  571. // -----------------------------------------------------------------------------
  572. // Digital Inputs
  573. // -----------------------------------------------------------------------------
  574. #ifndef DIGITAL1_PIN
  575. #define DIGITAL1_PIN GPIO_NONE
  576. #endif
  577. #ifndef DIGITAL2_PIN
  578. #define DIGITAL2_PIN GPIO_NONE
  579. #endif
  580. #ifndef DIGITAL3_PIN
  581. #define DIGITAL3_PIN GPIO_NONE
  582. #endif
  583. #ifndef DIGITAL4_PIN
  584. #define DIGITAL4_PIN GPIO_NONE
  585. #endif
  586. #ifndef DIGITAL5_PIN
  587. #define DIGITAL5_PIN GPIO_NONE
  588. #endif
  589. #ifndef DIGITAL6_PIN
  590. #define DIGITAL6_PIN GPIO_NONE
  591. #endif
  592. #ifndef DIGITAL7_PIN
  593. #define DIGITAL7_PIN GPIO_NONE
  594. #endif
  595. #ifndef DIGITAL8_PIN
  596. #define DIGITAL8_PIN GPIO_NONE
  597. #endif
  598. // -----------------------------------------------------------------------------
  599. // Events
  600. // -----------------------------------------------------------------------------
  601. #ifndef EVENTS1_PIN
  602. #define EVENTS1_PIN GPIO_NONE
  603. #endif
  604. #ifndef EVENTS2_PIN
  605. #define EVENTS2_PIN GPIO_NONE
  606. #endif
  607. #ifndef EVENTS3_PIN
  608. #define EVENTS3_PIN GPIO_NONE
  609. #endif
  610. #ifndef EVENTS4_PIN
  611. #define EVENTS4_PIN GPIO_NONE
  612. #endif
  613. #ifndef EVENTS5_PIN
  614. #define EVENTS5_PIN GPIO_NONE
  615. #endif
  616. #ifndef EVENTS6_PIN
  617. #define EVENTS6_PIN GPIO_NONE
  618. #endif
  619. #ifndef EVENTS7_PIN
  620. #define EVENTS7_PIN GPIO_NONE
  621. #endif
  622. #ifndef EVENTS8_PIN
  623. #define EVENTS8_PIN GPIO_NONE
  624. #endif
  625. // -----------------------------------------------------------------------------
  626. // Lights
  627. // -----------------------------------------------------------------------------
  628. #ifndef LIGHT_CHANNELS
  629. #define LIGHT_CHANNELS 0
  630. #endif
  631. #ifndef LIGHT_CH1_INVERSE
  632. #define LIGHT_CH1_INVERSE 0
  633. #endif
  634. #ifndef LIGHT_CH2_INVERSE
  635. #define LIGHT_CH2_INVERSE 0
  636. #endif
  637. #ifndef LIGHT_CH3_INVERSE
  638. #define LIGHT_CH3_INVERSE 0
  639. #endif
  640. #ifndef LIGHT_CH4_INVERSE
  641. #define LIGHT_CH4_INVERSE 0
  642. #endif
  643. #ifndef LIGHT_CH5_INVERSE
  644. #define LIGHT_CH5_INVERSE 0
  645. #endif
  646. // -----------------------------------------------------------------------------
  647. // General
  648. // -----------------------------------------------------------------------------
  649. // Device name (DNS, SoftAP SSID, ALEXA etc.)
  650. // If empty, default will be ESPURNA-XXXXXX, where XXXXXX is last 3 octets of chipID
  651. // When set, must be 1..31 characters. See:
  652. // https://github.com/xoseperez/espurna/issues/921
  653. // https://github.com/xoseperez/espurna/issues/1151
  654. #ifndef HOSTNAME
  655. #define HOSTNAME ""
  656. #endif
  657. // Relay providers
  658. #ifndef RELAY_PROVIDER
  659. #define RELAY_PROVIDER RELAY_PROVIDER_RELAY
  660. #endif
  661. // Light provider
  662. #ifndef LIGHT_PROVIDER
  663. #define LIGHT_PROVIDER LIGHT_PROVIDER_NONE
  664. #endif