Duncan McIntyre / Mbed 2 deprecated TouchScreenGUIDemo

Dependencies:   SimpleGUI SimpleGUITouchScreen TouchScreen UniGraphic mbed-rtos mbed

main.h

Committer:
duncanFrance
Date:
2016-03-27
Revision:
1:ece0ecedf40a
Parent:
0:402fb0c36182

File content as of revision 1:ece0ecedf40a:

#include "mbed.h"
#include "rtos.h"

#include "Arial12x12.h"
#include "Arial24x23.h"
#include "ILI932x.h"
#include "SimpleGUI.h"
#include "TouchScreenEventSource.h"


#define LCD_X_RES 240
#define LCD_Y_RES 320

#define LCD_CS PH_0
#define LCD_RESET PH_1
#define LCD_RS PA_0
#define LCD_WR PA_1
#define LCD_RD PA_4


#define T_CLK  PC_10
#define T_DIN  PC_12
#define T_DOUT PC_11
#define T_CS   PC_8
#define T_IRQ  PB_9

/**
* My touch screen lies at a slight angle and hides some of the screen   
* Adjust this value as needed until the calibration dots are visible on your screen
**/
#define CAL_OFFSET 4

/**
* hand-crafted values for the touch-screen calibration
**/
#define TOUCH_X_MIN 540
#define TOUCH_X_MAX 3700
#define TOUCH_Y_MIN 340
#define TOUCH_Y_MAX 3656