Subversion Repositories HomeAutomation

Rev

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

  1. #ifndef ACT_PCAPWM
  2. #define ACT_PCAPWM
  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 act_pcaPWM_Init(void);
  21. void act_pcaPWM_Process(void);
  22. void act_pcaPWM_HandleMessage(StdCan_Msg_t *rxMsg);
  23. void act_pcaPWM_List(uint8_t ModuleSequenceNumber);
  24.  
  25. #define act_pcaPWM_FACT 0xffUL/10000UL
  26.  
  27. #ifndef act_pcaPWM_USEEEPROM
  28. #define act_pcaPWM_USEEEPROM 0
  29. #endif
  30.  
  31. #if act_pcaPWM_USEEEPROM==1
  32.     struct act_pcaPWM_Data{
  33.         uint16_t ch1;
  34.         uint16_t ch2;
  35.         uint16_t ch3;
  36.         uint16_t ch4;
  37.         uint16_t ch5;
  38.         uint16_t ch6;
  39.         uint16_t ch7;
  40.         uint16_t ch8;
  41.     }; 
  42. #endif
  43.  
  44. #define ACT_PCAPWM_MAX_DIM              10000UL
  45. #define ACT_PCAPWM_MIN_DIM              0
  46.  
  47. #define ACT_PCAPWM_DEMO_STATE_NOT_RUNNING   0
  48. #define ACT_PCAPWM_DEMO_STATE_DECREASE      1
  49. #define ACT_PCAPWM_DEMO_STATE_INCREASE      2
  50. #define ACT_PCAPWM_DEMO_STATE_GOBACK        3
  51.  
  52. #endif // ACT_PCAPWM
  53.