Subversion Repositories HomeAutomation

Rev

Rev 1483 | Rev 1730 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | SVN | RSS feed

  1. /**
  2.  * @defgroup infrared IR Driver Library
  3.  * @code #include <drivers/ir/transceiver/transceiver.h> @endcode
  4.  *
  5.  * @brief  
  6.  *
  7.  *
  8.  * @author  Andreas Fritiofson, Anders Runeson
  9.  * @date    2007
  10.  */
  11.  
  12. /**@{*/
  13.  
  14. #ifndef IRTRANSCEIVER_H_
  15. #define IRTRANSCEIVER_H_
  16.  
  17. /*-----------------------------------------------------------------------------
  18.  * Includes
  19.  *---------------------------------------------------------------------------*/
  20. #include <stdio.h>
  21.  
  22. /*-----------------------------------------------------------------------------
  23.  * Defines
  24.  *---------------------------------------------------------------------------*/
  25.  
  26. #define MAX_NR_TIMES        101                                 //max ir pulses+pauses, used for dimensioning the buffer
  27.  
  28. #define TRUE 1
  29. #define FALSE 0
  30.  
  31. /*-----------------------------------------------------------------------------
  32.  * Public Function Prototypes
  33.  *---------------------------------------------------------------------------*/
  34. void IrTransceiver_Transmit(uint8_t channel, uint16_t *buffer, uint8_t length);
  35.  
  36. void IrTransceiver_Init(void);
  37. uint8_t IrTransceiver_GetStoreEnableRx(uint8_t channel);
  38. void IrTransceiver_DisableRx(uint8_t channel);
  39. void IrTransceiver_EnableRx(uint8_t channel);
  40. void IrTransceiver_ResetRx(uint8_t channel);
  41.  
  42. //void IrTransceiver_Init_RX_Channel(uint8_t channel, uint16_t *buffer, irCallback_t callback, uint8_t pcint_id, volatile uint8_t* port, volatile uint8_t* pin, volatile uint8_t* ddr,uint8_t nr, uint8_t pcint);
  43.  
  44. /**
  45.  * @brief Type of the callback function pointer
  46.  * parameters: channel, buffer, length
  47.  */
  48. typedef void (*irRxCallback_t)(uint8_t, uint16_t*, uint8_t);
  49. typedef void (*irTxCallback_t)(uint8_t);
  50.  
  51.  
  52. /*-----------------------------------------------------------------------------
  53.  * Private Function Prototypes
  54.  *---------------------------------------------------------------------------*/
  55.  
  56. void IrTransceiver_Store(uint8_t channel);
  57.  
  58. #endif /*IRTRANSCEIVER_H_*/
  59.