Subversion Repositories HomeAutomation

Rev

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

  1. #ifndef ACT_DOTMATRIX
  2. #define ACT_DOTMATRIX
  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_DotMatrix_Init(void);
  21. void act_DotMatrix_Process(void);
  22. void act_DotMatrix_HandleMessage(StdCan_Msg_t *rxMsg);
  23. void act_DotMatrix_List(uint8_t ModuleSequenceNumber);
  24.  
  25. #define USART_SPI_CS_DDR    DDRC
  26. #define USART_SPI_CS        PC0
  27. #define USART_SPI_XCK_DDR   DDRD
  28. #define USART_SPI_XCK       PD4
  29. #define waitspi() while(!(UCSR0A&(1<<RXC0)))
  30.  
  31. #define act_DotMatrix_PWM_FACT (256UL*0xff)/10000UL
  32.  
  33.  
  34. #ifndef act_DotMatrix_USEEEPROM
  35. #define act_DotMatrix_USEEEPROM 0
  36. #endif
  37.  
  38. #if act_DotMatrix_USEEEPROM==1
  39.     struct act_DotMatrix_Data{
  40.         ///TODO: Define EEPROM variables needed by the module
  41.         uint8_t x;
  42.         uint16_t y;
  43.     }; 
  44. #endif
  45.  
  46. #endif // ACT_DOTMATRIX
  47.