Subversion Repositories HomeAutomation

Rev

Rev 1978 | Blame | Compare with Previous | Last modification | View Log | SVN | RSS feed

  1. #ifndef SNS_COUNTER
  2. #define SNS_COUNTER
  3.  
  4. /*-----------------------------------------------------------------------------
  5.  * Includes
  6.  *---------------------------------------------------------------------------*/
  7. /* system files */
  8. #include <avr/io.h>
  9. #include <avr/interrupt.h>
  10. #include <stdio.h>
  11. /* lib files */
  12. #include <config.h>
  13. #include <bios.h>
  14. #include <drivers/can/stdcan.h>
  15. #include <drivers/timer/timer.h>
  16. #include <drivers/mcu/gpio.h>
  17. #include <drivers/adc/adc.h>
  18. #include <drivers/mcu/pcint.h>
  19.  
  20. void sns_counter_Init(void);
  21. void sns_counter_Process(void);
  22. void sns_counter_HandleMessage(StdCan_Msg_t *rxMsg);
  23. void sns_counter_List(uint8_t ModuleSequenceNumber);
  24.  
  25.  
  26. #ifndef sns_counter_USEEEPROM
  27. #define sns_counter_USEEEPROM 0
  28. #endif
  29.  
  30. #if sns_counter_USEEEPROM==1
  31.     struct sns_counter_Data{
  32.         uint8_t reportInterval;
  33.         uint32_t Count0;
  34.     };
  35. #endif
  36.  
  37. #ifndef sns_counter_CH0_pullup
  38. #define sns_counter_CH0_pullup 0
  39. #endif
  40. #ifndef sns_counter_CH1_pullup
  41. #define sns_counter_CH1_pullup 1
  42. #endif
  43. #ifndef sns_counter_CH2_pullup
  44. #define sns_counter_CH2_pullup 2
  45. #endif
  46. #ifndef sns_counter_CH3_pullup
  47. #define sns_counter_CH3_pullup 3
  48. #endif
  49. #ifndef sns_counter_CH4_pullup
  50. #define sns_counter_CH4_pullup 4
  51. #endif
  52. #ifndef sns_counter_CH5_pullup
  53. #define sns_counter_CH5_pullup 5
  54. #endif
  55. #ifndef sns_counter_CH6_pullup
  56. #define sns_counter_CH6_pullup 6
  57. #endif
  58. #ifndef sns_counter_CH7_pullup
  59. #define sns_counter_CH7_pullup 7
  60. #endif
  61.  
  62. #ifndef sns_counter_CH0_DEBOUNCE_TIME_MS
  63. #define sns_counter_CH0_DEBOUNCE_TIME_MS 0
  64. #endif
  65. #ifndef sns_counter_CH1_DEBOUNCE_TIME_MS
  66. #define sns_counter_CH1_DEBOUNCE_TIME_MS 0
  67. #endif
  68. #ifndef sns_counter_CH2_DEBOUNCE_TIME_MS
  69. #define sns_counter_CH2_DEBOUNCE_TIME_MS 0
  70. #endif
  71. #ifndef sns_counter_CH3_DEBOUNCE_TIME_MS
  72. #define sns_counter_CH3_DEBOUNCE_TIME_MS 0
  73. #endif
  74. #ifndef sns_counter_CH4_DEBOUNCE_TIME_MS
  75. #define sns_counter_CH4_DEBOUNCE_TIME_MS 0
  76. #endif
  77. #ifndef sns_counter_CH5_DEBOUNCE_TIME_MS
  78. #define sns_counter_CH5_DEBOUNCE_TIME_MS 0
  79. #endif
  80. #ifndef sns_counter_CH6_DEBOUNCE_TIME_MS
  81. #define sns_counter_CH6_DEBOUNCE_TIME_MS 0
  82. #endif
  83. #ifndef sns_counter_CH7_DEBOUNCE_TIME_MS
  84. #define sns_counter_CH7_DEBOUNCE_TIME_MS 0
  85. #endif
  86.  
  87. #endif // SNS_COUNTER
  88.