Subversion Repositories HomeAutomation

Rev

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

  1. #ifndef IRTRANSMITTER_H_
  2. #define IRTRANSMITTER_H_
  3.  
  4.  
  5. /*-----------------------------------------------------------------------------
  6.  * Includes
  7.  *---------------------------------------------------------------------------*/
  8. #include <stdio.h>
  9. #include <drivers/ir/ircommon.h>
  10.  
  11. /*-----------------------------------------------------------------------------
  12.  * Defines
  13.  *---------------------------------------------------------------------------*/
  14. #define IRPORT  PORTD
  15. #define IRPIN   PIND
  16. #define IRDDR   DDRD
  17. #define IRBIT   PD6
  18.  
  19. #define STATE_IDLE  0
  20. #define STATE_TRANS 1
  21.  
  22. /*-----------------------------------------------------------------------------
  23.  * Public Function Prototypes
  24.  *---------------------------------------------------------------------------*/
  25. void IrTransmit_Init(void);
  26. uint8_t IrTransmit_Start(uint8_t proto, uint8_t address, uint8_t command);
  27. uint8_t IrTransmit_Stop(void);
  28. void IrTransmit_Poll(void);
  29.  
  30. /*-----------------------------------------------------------------------------
  31.  * Private Function Prototypes
  32.  *---------------------------------------------------------------------------*/
  33. void setIrPort(void);
  34. void clearIrPort(void);
  35.  
  36. #endif /*IRTRANSMITTER_H_*/
  37.