Subversion Repositories HomeAutomation

Rev

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

  1. #ifndef SNS_POWER
  2. #define SNS_POWER
  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.  
  18. #include <drivers/mcu/pcint.h>
  19.  
  20. void sns_power_Init(void);
  21. void sns_power_Process(void);
  22. void sns_power_HandleMessage(StdCan_Msg_t *rxMsg);
  23. void sns_power_List(uint8_t ModuleSequenceNumber);
  24.  
  25.  
  26. #ifndef sns_power_USEEEPROM
  27. #define sns_power_USEEEPROM 0
  28. #endif
  29.  
  30. #ifndef sns_power_PIN_PULLUP
  31. #define sns_power_PIN_PULLUP 1
  32. #endif
  33.  
  34. #ifndef sns_power_PIN_PULLUP_ch2
  35. #define sns_power_PIN_PULLUP_ch2 1
  36. #endif
  37.  
  38. #if sns_power_USEEEPROM==1
  39.     struct sns_power_Data{
  40.         ///TODO: Define EEPROM variables needed by the module
  41.         uint8_t reportInterval;
  42.         uint16_t EnergyCounterUpper;
  43.         uint16_t EnergyCounterLower;
  44. #ifdef POWER_SNS_PIN_ch2
  45.         uint16_t EnergyCounterUpper_ch2;
  46.         uint16_t EnergyCounterLower_ch2;
  47. #endif
  48.     }; 
  49. #endif
  50.  
  51. #endif // SNS_POWER
  52.