cpu/xmega/include/cpu/touch/resistive/touch.h File Reference

XMEGA specific functions for 4-wire resistive touch driver. More...

#include <compiler.h>
#include <stdint.h>
#include <gpio.h>
#include <pmic.h>
#include <regs/xmega_adc.h>
#include <regs/xmega_portcfg.h>

Go to the source code of this file.

Defines

#define touch_priv_adc_get_y   touch_priv_adc_get_x
 Return mean of XL and XR ADC measurements.
Pin mask macros for convenience

#define TOUCH_XL_MASK   (1U << CONFIG_TOUCH_XL_PIN)
#define TOUCH_XR_MASK   (1U << CONFIG_TOUCH_XR_PIN)
#define TOUCH_YD_MASK   (1U << CONFIG_TOUCH_YD_PIN)
#define TOUCH_YU_MASK   (1U << CONFIG_TOUCH_YU_PIN)
#define TOUCH_X_MASK   (TOUCH_XL_MASK | TOUCH_XR_MASK)
#define TOUCH_Y_MASK   (TOUCH_YD_MASK | TOUCH_YU_MASK)

Functions

static __always_inline void touch_priv_port_init (void)
 Initialize port for touch detection.
static __always_inline void touch_priv_port_enable_int (void)
 Enable interrupt for touch detection.
static __always_inline void touch_priv_port_disable_int (void)
 Disable interrupt for touch detection.
static __always_inline bool touch_priv_port_is_int_flag_set (void)
 Return current state of port interrupt flag.
static __always_inline void touch_priv_port_clear_int_flag (void)
 Clear the port interrupt flag.
static __always_inline void touch_priv_port_set_detection (void)
 Configure port for touch detection.
static __always_inline void touch_priv_port_set_gradient_x (void)
 Configure port for gradient on X touch surface.
static __always_inline void touch_priv_port_set_gradient_y (void)
 Configure port for gradient on Y touch surface.
static __always_inline void touch_priv_adc_init (void)
 Initialize the ADC for readings from touch surfaces.
static __always_inline void touch_priv_adc_enable_int (void)
 Enable ADC interrupts.
static __always_inline void touch_priv_adc_disable_int (void)
 Disable ADC interrupts.
static __always_inline void touch_priv_adc_clear_int_flag (void)
 Clear the interrupt flag for ADC.
static __always_inline void touch_priv_adc_set_surface_y (void)
 Start ADC scan sequence to measure position on Y surface.
static __always_inline void touch_priv_adc_set_surface_x (void)
 Set ADC scan sequence to measure position on X surface.
static __always_inline void touch_priv_adc_start (void)
 Trigger AD conversions.
static __always_inline uint16_t touch_priv_adc_get_x (void)
 Return mean of YD and YU ADC measurements.

Detailed Description

XMEGA specific functions for 4-wire resistive touch driver.

Copyright (C) 2009 Atmel Corporation. All rights reserved.

Definition in file touch.h.

Generated on Thu Apr 29 15:18:22 2010 for display-training by  doxygen 1.6.3