/*
 * touch.h
 *
 *  Created on: 07.10.2014
 *      Author: Alex
 */

#ifndef TOUCH_H_
#define TOUCH_H_

#define TOUCH_SSI_BASE	SSI0_BASE
#define TOUCH_SSI_PER	SYSCTL_PERIPH_SSI0
#define TOUCH_SSI_PORT	GPIO_PORTA_BASE
#define TOUCH_SSI_MOSI	GPIO_PIN_5
#define TOUCH_SSI_MISO	GPIO_PIN_4
#define TOUCH_SSI_CLK	GPIO_PIN_2
#define TOUCH_CS_PIN	GPIO_PIN_1
#define TOUCH_CS_PORT	GPIO_PORTH_BASE
#define TOUCH_IRQ_PIN	GPIO_PIN_4
#define TOUCH_IRQ_PORT	GPIO_PORTC_BASE
#define TOUCH_IRQ_INTR  INT_GPIOC

volatile unsigned int count;
volatile int dummy;
int data[6];

void Touchinit();
void getTouchData();
void touchInRange(int x, int y);

#endif /* TOUCH_H_ */
