Subversion Repositories HomeAutomation

Rev

Blame | Last modification | View Log | SVN | RSS feed

  1. /*******************************************************************************
  2. *   touch.h
  3. *   Atmel Corporation:  http://www.atmel.com \n
  4. *   Support email:  touch@atmel.com
  5. ******************************************************************************/
  6. /*  License
  7. *   Copyright (c) 2010, Atmel Corporation All rights reserved.
  8. *
  9. *   Redistribution and use in source and binary forms, with or without
  10. *   modification, are permitted provided that the following conditions are met:
  11. *
  12. *   1. Redistributions of source code must retain the above copyright notice,
  13. *   this list of conditions and the following disclaimer.
  14. *
  15. *   2. Redistributions in binary form must reproduce the above copyright notice,
  16. *   this list of conditions and the following disclaimer in the documentation
  17. *   and/or other materials provided with the distribution.
  18. *
  19. *   3. The name of ATMEL may not be used to endorse or promote products derived
  20. *   from this software without specific prior written permission.
  21. *
  22. *   THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
  23. *   WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  24. *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
  25. *   SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
  26. *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  27. *   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  28. *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  29. *   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  30. *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  31. *   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32. */
  33. /*  This is an automatically generated file. Do not modify the contents manually.
  34.     Instead, use the Project Builder Wizard to make changes to the design.
  35. */
  36.  
  37.  
  38. /**
  39.   * Acquisition Technology Name.
  40.   *
  41.   * Possible values: _QMATRIX_, _QTOUCH_ .
  42.   */
  43. #define _QTOUCH_
  44.  
  45. /**
  46.   * Device Name.
  47.   *.
  48.   */
  49. #define __ATmega328P__
  50.  
  51.  
  52. /**
  53.   * Number of Channels(dependent on the library used).
  54.   *
  55.   * Possible values: 4, 8, 12, 16.
  56.   */
  57. #define QT_NUM_CHANNELS 8
  58.  
  59. /**
  60.   * Delay cycles that determine the capacitance charge pulse width.
  61.   *
  62.   * Possible values: 1 to 255
  63.   */
  64. #ifndef QT_DELAY_CYCLES
  65. #define QT_DELAY_CYCLES 10
  66. #endif
  67.  
  68. /**
  69.   * Enabling the _ROTOR_SLIDER_ constant will link the library need for using rotors
  70.   * and sliders.
  71.   *
  72.   * Possible values: comment/uncomment the define
  73.   */
  74.  
  75. #define _ROTOR_SLIDER_
  76.  
  77. /**
  78.   * Enabling _POWER_OPTIMIZATION_ will lead to a 40% reduction in power consumed
  79.   * by the library, but by disabling spread spectrum feature. When power optimization
  80.   * is enabled the unused pins, within a port used for QTouch, may not be usable for
  81.   * interrupt driven applications. This option is available only for ATtiny and ATmega
  82.   * devices.
  83.   *
  84.   * Possible values: 0 or 1 (For ATtiny and ATmega devices)
  85.   *                  0 (For ATxmega devices)
  86.   */
  87.  
  88. #ifndef _POWER_OPTIMIZATION_
  89. #define _POWER_OPTIMIZATION_ 0
  90. #endif
  91.  
  92.  
  93.  
  94.  
  95. /**
  96.   * Define the ports to be used for SNS1,SNS2 and SNSK1,SNSK2 pins. SNS1,SNS2 and
  97.   * SNSK1,SNSK2 port pins can be available on the same port or on different ports.
  98.   * _SNS1_SNSK1_SAME_PORT_ is defined if first port pair SNS1 and SNSK1 are on
  99.   * same port. _SNS2_SNSK2_SAME_PORT_ is defined if SNS2 and SNSK2 are on same port.
  100.   * Possible values:
  101.   */
  102.  
  103. #define QTOUCH_STUDIO_MASKS 1
  104. #define NUMBER_OF_PORTS 1
  105.  
  106. #define SNS1    D
  107. #define SNSK1   C
  108.  
  109.  
  110.  
  111. /**
  112.   * Measurement Period Time determines the time to measure touch
  113.   *
  114.   * Possible values:
  115.   */
  116. #define QT_MEASUREMENT_PERIOD_MS 50u
  117.  
  118.  
  119. /**
  120.   * Total ticks per msec.
  121.   * TICKS_PER_MS = (CLK_FREQ/TIMER_PRESCALER)*(1/1000)
  122.   */
  123. #define TICKS_PER_MS 500u
  124.  
  125.  
  126. /******************************************************************************
  127. *   Debug Interface Settings
  128. ******************************************************************************/
  129.  
  130. // #define _DEBUG_INTERFACE_
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.