Subversion Repositories HomeAutomation

Rev

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

  1. #ifndef IRRECEIVE_H_
  2. #define IRRECEIVE_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   PD2
  18.  
  19. #define MAX_NR_TIMES        100                                 //max ir pulses+pauses, used for dimensioning the buffer
  20.  
  21. /*-----------------------------------------------------------------------------
  22.  * Public Function Prototypes
  23.  *---------------------------------------------------------------------------*/
  24. void IrReceive_Init(void);
  25. uint8_t IrReceive_CheckIR(uint8_t *proto, uint8_t *address, uint8_t *command, uint16_t *timeout);
  26. uint8_t IrReceive_CheckIdle(void);
  27. uint16_t getRawData(uint8_t index);
  28. uint8_t getRawDataCnt(void);
  29.  
  30. /*-----------------------------------------------------------------------------
  31.  * Private Function Prototypes
  32.  *---------------------------------------------------------------------------*/
  33. uint8_t receiveRC5(uint8_t *address, uint8_t *command);
  34. uint8_t receiveSIRC(uint8_t *address, uint8_t *command);
  35.  
  36.  
  37. #endif /*IRRECEIVE_H_*/
  38.