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.

740 lines
17 KiB

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