qt1081.h File Reference


Detailed Description

QT1081 helper functions.

This file contains definitions and services related to the features of the QT1081 touch sensor device.

Author:
Atmel Corporation: http://www.atmel.com
Support and FAQ: http://support.atmel.no/

Definition in file qt1081.h.

#include "compiler.h"
#include "board.h"
#include "gpio.h"

Go to the source code of this file.

Functions

__inline__ int is_touch_sensor_0 (void)
 This function tests if touch sensor 0 was touched.
__inline__ int is_touch_sensor_1 (void)
 This function tests if touch sensor 1 was touched.
__inline__ int is_touch_sensor_2 (void)
 This function tests if touch sensor 2 was touched.
__inline__ int is_touch_sensor_3 (void)
 This function tests if touch sensor 3 was touched.
__inline__ int is_touch_sensor_4 (void)
 This function tests if touch sensor 4 was touched.
__inline__ void qt1081_power_down (void)
 Puts the QT1081 into low power mode.
__inline__ void qt1081_power_up (void)
 Puts the QT1081 into low power mode.


Function Documentation

__inline__ int is_touch_sensor_0 ( void   ) 

This function tests if touch sensor 0 was touched.

Returns:
TRUE if the sensor is touched, otherwise 0.

Definition at line 84 of file qt1081.h.

00085 {
00086   return (gpio_get_pin_value(QT1081_TOUCH_SENSOR_0)) == QT1081_TOUCH_SENSOR_0_PRESSED;
00087 }

__inline__ int is_touch_sensor_1 ( void   ) 

This function tests if touch sensor 1 was touched.

Returns:
TRUE if the sensor is touched, otherwise 0.

Definition at line 98 of file qt1081.h.

00099 {
00100   return (gpio_get_pin_value(QT1081_TOUCH_SENSOR_1)) == QT1081_TOUCH_SENSOR_1_PRESSED;
00101 }

__inline__ int is_touch_sensor_2 ( void   ) 

This function tests if touch sensor 2 was touched.

Returns:
TRUE if the sensor is touched, otherwise 0.

Definition at line 112 of file qt1081.h.

00113 {
00114   return (gpio_get_pin_value(QT1081_TOUCH_SENSOR_2)) == QT1081_TOUCH_SENSOR_2_PRESSED;
00115 }

__inline__ int is_touch_sensor_3 ( void   ) 

This function tests if touch sensor 3 was touched.

Returns:
TRUE if the sensor is touched, otherwise 0.

Definition at line 126 of file qt1081.h.

00127 {
00128   return (gpio_get_pin_value(QT1081_TOUCH_SENSOR_3)) == QT1081_TOUCH_SENSOR_3_PRESSED;
00129 }

__inline__ int is_touch_sensor_4 ( void   ) 

This function tests if touch sensor 4 was touched.

Returns:
TRUE if the sensor is touched, otherwise 0.

Definition at line 140 of file qt1081.h.

00141 {
00142   return (gpio_get_pin_value(QT1081_TOUCH_SENSOR_4)) == QT1081_TOUCH_SENSOR_4_PRESSED;
00143 }

__inline__ void qt1081_power_down ( void   ) 

Puts the QT1081 into low power mode.

Definition at line 62 of file qt1081.h.

00063 {
00064     gpio_set_gpio_pin(QT1081_LP_MODE);
00065 }

__inline__ void qt1081_power_up ( void   ) 

Puts the QT1081 into low power mode.

Definition at line 72 of file qt1081.h.

00073 {
00074     gpio_clr_gpio_pin(QT1081_LP_MODE);
00075 }


Generated on Fri Feb 19 02:24:03 2010 for AVR32 - QT1081 Driver by  doxygen 1.5.5