Subversion Repositories HomeAutomation

Rev

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

  1. /**
  2.  * @defgroup mt8870 Mitel DTMF-receiver Library
  3.  * @code #include <drivers/DTMF/mt8870/mt8870.h> @endcode
  4.  *
  5.  * @brief xyz
  6.  *
  7.  * @author  Anders Runeson
  8.  * @date    2007-08-24
  9.  */
  10.  
  11. /**@{*/
  12.  
  13. #ifndef MT8870_H_
  14. #define MT8870_H_
  15.  
  16. /*-----------------------------------------------------------------------------
  17.  * Defines
  18.  *---------------------------------------------------------------------------*/
  19.  
  20. /* Should be defined in user config.inc */
  21. #if 0
  22. /*
  23.  * Signals connected from MT8870 is
  24.  * StD, Q1, Q2, Q3 och Q4
  25.  */
  26. #define MT_StD_PIN      PIND
  27. #define MT_StD_DDR      DDRD
  28. #define MT_StD_BIT      PD2
  29.  
  30. #define MT_Q1_PIN       PINC
  31. #define MT_Q1_DDR       DDRC
  32. #define MT_Q1_BIT       PC0
  33.  
  34. #define MT_Q2_PIN       PINC
  35. #define MT_Q2_DDR       DDRC
  36. #define MT_Q2_BIT       PC1
  37.  
  38. #define MT_Q3_PIN       PINC
  39. #define MT_Q3_DDR       DDRC
  40. #define MT_Q3_BIT       PC2
  41.  
  42. #define MT_Q4_PIN       PINC
  43. #define MT_Q4_DDR       DDRC
  44. #define MT_Q4_BIT       PC3
  45.  
  46. /* Time to elapse to know when number sequence is over */
  47. #define DIAL_TIMEOUT    1800
  48.  
  49. /* Maximum number of tones to store for the number */
  50. #define MAX_TONES       16
  51.  
  52. #endif
  53.  
  54. /* Returnvalues */
  55. #define RET_NOT_FINISHED    0
  56. #define RET_FINISHED        1
  57. #define RET_OVERFLOW        2
  58.  
  59. /*-----------------------------------------------------------------------------
  60.  * Public Function Prototypes
  61.  *---------------------------------------------------------------------------*/
  62. void DTMFin_Init(void);
  63. uint8_t DTMFin_Poll(uint8_t *len);
  64. void DTMFin_Start(uint8_t *buffer);
  65.  
  66. /*-----------------------------------------------------------------------------
  67.  * Private Function Prototypes
  68.  *---------------------------------------------------------------------------*/
  69. void DTMFin_timer_callback(uint8_t timer);
  70.  
  71. #endif /*MT8870_H_*/
  72.