Subversion Repositories HomeAutomation

Rev

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

  1. #ifndef SNS_INPUT
  2. #define SNS_INPUT
  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. //to use PCINT lib. uncomment the line below
  19. #include <drivers/mcu/pcint.h>
  20. #include <drivers/io/PCA95xx.h>
  21.  
  22. void sns_input_Init(void);
  23. void sns_input_Process(void);
  24. void sns_input_HandleMessage(StdCan_Msg_t *rxMsg);
  25. void sns_input_List(uint8_t ModuleSequenceNumber);
  26.  
  27. #ifndef sns_input_CH0PCA95xxIO
  28. #define sns_input_CH0PCA95xxIO 0
  29. #endif
  30. #ifndef sns_input_CH1PCA95xxIO
  31. #define sns_input_CH1PCA95xxIO 0
  32. #endif
  33. #ifndef sns_input_CH2PCA95xxIO
  34. #define sns_input_CH2PCA95xxIO 0
  35. #endif
  36. #ifndef sns_input_CH3PCA95xxIO
  37. #define sns_input_CH3PCA95xxIO 0
  38. #endif
  39. #ifndef sns_input_CH4PCA95xxIO
  40. #define sns_input_CH4PCA95xxIO 0
  41. #endif
  42. #ifndef sns_input_CH5PCA95xxIO
  43. #define sns_input_CH5PCA95xxIO 0
  44. #endif
  45. #ifndef sns_input_CH6PCA95xxIO
  46. #define sns_input_CH6PCA95xxIO 0
  47. #endif
  48. #ifndef sns_input_CH7PCA95xxIO
  49. #define sns_input_CH7PCA95xxIO 0
  50. #endif
  51.  
  52. #if sns_input_CH0PCA95xxIO==1 |sns_input_CH1PCA95xxIO==1 | sns_input_CH2PCA95xxIO==1 | sns_input_CH3PCA95xxIO==1 | sns_input_CH4PCA95xxIO==1 | sns_input_CH5PCA95xxIO==1 | sns_input_CH6PCA95xxIO==1 | sns_input_CH7PCA95xxIO==1
  53. #define sns_input_ENABLE_PCA95xx 1
  54. #else
  55. #define sns_input_ENABLE_PCA95xx 0
  56. #endif
  57.  
  58. #endif // SNS_INPUT
  59.