Subversion Repositories HomeAutomation

Rev

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

  1. #ifndef ACT_OUTPUT
  2. #define ACT_OUTPUT
  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/io/PCA95xx.h>
  18.  
  19. //to use PCINT lib. uncomment the line below
  20. //#include <drivers/mcu/pcint.h>
  21.  
  22. void act_output_Init(void);
  23. void act_output_Process(void);
  24. void act_output_HandleMessage(StdCan_Msg_t *rxMsg);
  25. void act_output_List(uint8_t ModuleSequenceNumber);
  26.  
  27.  
  28. #ifndef act_output_USEEEPROM
  29. #define act_output_USEEEPROM 0
  30. #endif
  31.  
  32. #if act_output_USEEEPROM==1
  33.     struct act_output_Data{
  34.         ///TODO: Define EEPROM variables needed by the module
  35.  
  36. #ifdef  act_output_CH0
  37.         uint8_t ch0;
  38. #endif
  39. #ifdef  act_output_CH1
  40.         uint8_t ch1;
  41. #endif
  42. #ifdef  act_output_CH2
  43.         uint8_t ch2;
  44. #endif
  45. #ifdef  act_output_CH3
  46.         uint8_t ch3;
  47. #endif
  48. #ifdef  act_output_CH4
  49.         uint8_t ch4;
  50. #endif
  51. #ifdef  act_output_CH5
  52.         uint8_t ch5;
  53. #endif
  54. #ifdef  act_output_CH6
  55.         uint8_t ch6;
  56. #endif
  57. #ifdef  act_output_CH7
  58.         uint8_t ch7;
  59. #endif
  60. #ifdef  act_output_CH8
  61.         uint8_t ch8;
  62. #endif
  63. #ifdef  act_output_CH9
  64.         uint8_t ch9;
  65. #endif
  66.     }; 
  67. #endif
  68.  
  69. #ifndef act_output_NUM_SUPPORTED
  70. #define act_output_NUM_SUPPORTED 10
  71. #endif
  72.  
  73. #ifndef act_output_CH0PCA95xxIO
  74. #define act_output_CH0PCA95xxIO 0
  75. #endif
  76. #ifndef act_output_CH1PCA95xxIO
  77. #define act_output_CH1PCA95xxIO 0
  78. #endif
  79. #ifndef act_output_CH2PCA95xxIO
  80. #define act_output_CH2PCA95xxIO 0
  81. #endif
  82. #ifndef act_output_CH3PCA95xxIO
  83. #define act_output_CH3PCA95xxIO 0
  84. #endif
  85. #ifndef act_output_CH4PCA95xxIO
  86. #define act_output_CH4PCA95xxIO 0
  87. #endif
  88. #ifndef act_output_CH5PCA95xxIO
  89. #define act_output_CH5PCA95xxIO 0
  90. #endif
  91. #ifndef act_output_CH6PCA95xxIO
  92. #define act_output_CH6PCA95xxIO 0
  93. #endif
  94. #ifndef act_output_CH7PCA95xxIO
  95. #define act_output_CH7PCA95xxIO 0
  96. #endif
  97. #ifndef act_output_CH8PCA95xxIO
  98. #define act_output_CH8PCA95xxIO 0
  99. #endif
  100. #ifndef act_output_CH9PCA95xxIO
  101. #define act_output_CH9PCA95xxIO 0
  102. #endif
  103.  
  104.  
  105. #endif // ACT_OUTPUT
  106.