Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.32 KB | None | 0 0
  1. /*
  2.  * config.h
  3.  *
  4.  *  Created on: 22.02.2018
  5.  *      Author: harry
  6.  */
  7.  
  8. #ifndef CONFIG_H_
  9. #define CONFIG_H_
  10.  
  11. #ifndef PRODUCTION              // are we in Developer-mode?
  12. #define CAN_BASEID  0x600
  13. #define WITH_DISPLAY            // 4x20 LCD-Display installed
  14. #define WITH_DS3231             // DS231 RTC
  15. // #define WITH_RELAYS_4CH      // 4Ch Relays-board
  16. // #define WITH_RELAYS_16CH     // 16Ch Relays-board
  17. // #define WITH_DS18X20         // ds18x20 OneWire Temp.-sensor
  18.  
  19. // template is only included in development-build
  20. // for testing purpose only
  21. #define WITH_TEMPLATE
  22. #endif
  23.  
  24. #if defined(WITH_DISPLAY) || defined(WITH_DS3231)       // we need IĀ²C
  25. #define WITH_I2C
  26. #endif
  27.  
  28. #if defined(WITH_DS3231)
  29. #define WITH_RTC
  30. #endif
  31.  
  32. #if defined(WITH_RELAYS_16CH) || defined(WITH_RELAYS_4CH)
  33. #define WITH_RELAYS
  34. #endif
  35.  
  36. #ifdef WITH_RELAYS_4CH
  37.     #define REL_CHANNELS    4
  38.  
  39.     #define RELAYS_PORT PORTC
  40.     #define RELAYS_DDR DDRC
  41.     #define RELAYS_ACTIVE_LOW
  42. #endif
  43.  
  44. #ifdef WITH_RELAYS_16CH
  45.     #define REL_CHANNELS    16
  46.  
  47.     #define RELAYS_WITH_PWM             // enable power saving relays-mode
  48.  
  49.     #define RELAYS_PORT     PORTC
  50.     #define RELAYS_DDR      DDRC
  51.     #define SHCP            PC3
  52.     #define STCP            PC2
  53.     #define DTA             PC1
  54. #endif
  55.  
  56. #ifdef RELAYS_WITH_PWM
  57.     #define BOOSTTIME       10      // 10ms full power
  58.     #define BOOSTPOWER      0xfe
  59.     #define HOLDPOWER       0x1C
  60. #endif
  61.  
  62. #endif /* CONFIG_H_ */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement