omap3530/beagle_drivers/byd_touch/xyin/xyin.cpp
author Lukasz Forynski <lukasz.forynski@gmail.com>
Tue, 02 Nov 2010 00:33:23 +0000
branchBeagle_BSP_dev
changeset 95 450a8cf0c020
parent 85 d93b485c1325
permissions -rw-r--r--
updated byd touch controller handling. needs debugging and update.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
85
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
     1
// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
     2
// All rights reserved.
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
     3
// This component and the accompanying materials are made available
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
     4
// under the terms of the License "Eclipse Public License v1.0"
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
     5
// which accompanies this distribution, and is available
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
     7
//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
     8
// Initial Contributors:
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    10
//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    11
// Contributors:
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    12
//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    13
// Description:
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    14
// Implementation of a digitiser (touch-screen) driver.
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    15
// This code assumes that an interrupt is generated on pen-down and pen-up events.
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    16
//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    17
//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    18
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    19
#include <assp.h>
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    20
#include <videodriver.h>
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    21
#include <drivers/xyin.h>
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    22
#include <assp/omap3530_assp/omap3530_gpio.h>
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    23
#include <assp/omap3530_assp/omap3530_scm.h>
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    24
#include "mconf.h"
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    25
#include "../common/controller.h"
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    26
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    27
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    28
// TODO replace DEBUG_PRINT(  with  __KTRACE_OPT(KHARDWARE,
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    29
#define DEBUG_PRINT(x) x
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    30
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    31
const TInt KXyinThreadPriority = 33; // might need to be updated..
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    32
_LIT(KXyinThreadName, "DigitizerThread");
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    33
//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    34
// TO DO: (mandatory)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    35
//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    36
// Define the following constants that describe the digitiser position & dimensions
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    37
// This is only example code... you need to modify it for your hardware
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    38
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    39
// digitiser origin & size in pixels
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    40
const TUint	KConfigXyOffsetX	= 0;		// digitiser origin - same as display area
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    41
const TUint	KConfigXyOffsetY	= 0;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    42
const TUint	KConfigXyWidth		= 640;		// 640 pixels per line
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    43
const TUint	KConfigXyHeight		= 480;		// 480 lines per panel
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    44
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    45
// digitiser dimensions in digitiser co-ordinates
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    46
const TInt KConfigXyBitsX   = 12;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    47
const TInt KConfigXyBitsY   = 12;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    48
const TInt KConfigXySpreadX = 1 << KConfigXyBitsX;  // maximum valid X spread
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    49
const TInt KConfigXySpreadY = 1 << KConfigXyBitsY;  // maximum valid Y spread
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    50
const TInt KConfigXyMinX    = 0;                    // minimum valid X value
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    51
const TInt KConfigXyMinY    = 0;                    // minimum valid Y value
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    52
const TInt KConfigXyMaxX    = KConfigXySpreadX - 1; // maximum valid X value
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    53
const TInt KConfigXyMaxY    = KConfigXySpreadY - 1; // maximum valid Y value
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    54
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    55
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    56
// Define a 2x2 matrix and two constants Tx and Ty to convert digitiser co-ordinates
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    57
// to pixels such that
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    58
//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    59
// (X<<16 Y<<16)	=	(x y)	x	(R11 R12)	+	(Tx Ty)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    60
//									(R21 R22)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    61
// or :
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    62
//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    63
// X = (x*R11 + y*R21 + TX) >> 16;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    64
// Y = (x*R12 + y*R22 + TY) >> 16;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    65
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    66
//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    67
// where x,y are digitiser coordinates, Tx,Ty are constant offsets and X,Y are screen
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    68
// coordinates. Left shifting by 16 bits is used so as not to lose precision.
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    69
//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    70
// These are default values to be used before calibration has taken place
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    71
// These are best set by observation.
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    72
// The example values given below are for a digitiser whose origin is at bottom left
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    73
// (the screen origin is at top left)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    74
const TInt		KConfigXyR11		= (KConfigXyWidth << 16) / KConfigXySpreadX;		// 10240
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    75
const TInt		KConfigXyR12		= 0;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    76
const TInt		KConfigXyR21		= 0;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    77
const TInt		KConfigXyR22		= - ((KConfigXyHeight << 16) / KConfigXySpreadY);	// -7680
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    78
const TInt		KConfigXyTx			= 0;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    79
const TInt		KConfigXyTy			= (KConfigXyHeight << 16) / KConfigXySpreadY;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    80
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    81
//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    82
// TO DO: (optional)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    83
//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    84
// Define the following constants that describe the digitiser behaviour
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    85
// This is only example code... you need to modify it for your hardware
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    86
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    87
// After taking a sample, wait for the specified number of nano-kernel ticks (normally 1 ms)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    88
// before taking the next sample
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    89
const TInt		KInterSampleTime	= 1;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    90
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    91
// After a group of samples has been processed by the DDigitiser::ProcessRawSample() DFC,
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    92
// wait for the specified number of nano-kernel ticks before taking the next sample
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    93
const TInt		KInterGroupTime		= 1;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    94
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    95
// After a pen-down interrupt,
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    96
// wait for the specified number of nano-kernel ticks before taking the next sample
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    97
const TInt		KPenDownDelayTime	= 2;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    98
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
    99
// If powering up the device with the pen down,
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   100
// wait for the specified number of nano-kernel ticks before taking the next sample
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   101
const TInt		KPenUpPollTime		= 30;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   102
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   103
// After a pen-up interrupt,
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   104
// wait for the specified number of nano-kernel ticks before calling PenUp()
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   105
const TInt		KPenUpDebounceTime	= 10;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   106
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   107
// number of samples to discard on pen-down
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   108
const TInt		KConfigXyPenDownDiscard	= 1;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   109
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   110
// number of samples to discard on pen-up
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   111
const TInt		KConfigXyPenUpDiscard	= 1;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   112
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   113
// offset in pixels to cause movement in X direction
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   114
const TInt		KConfigXyAccThresholdX	= 12;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   115
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   116
// offset in pixels to cause movement in Y direction
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   117
const TInt		KConfigXyAccThresholdY	= 12;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   118
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   119
// number of samples to average - MUST be <= KMaxXYSamples
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   120
const TInt		KConfigXyNumXYSamples	= 2;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   121
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   122
// disregard extremal values in each 4-sample group
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   123
const TBool		KConfigXyDisregardMinMax= EFalse;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   124
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   125
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   126
// obsolete constants :
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   127
const TInt		KConfigXyDriveXRise		= 0;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   128
const TInt		KConfigXyDriveYRise		= 0;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   129
const TInt		KConfigXyMaxJumpX		= 0;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   130
const TInt		KConfigXyMaxJumpY		= 0;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   131
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   132
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   133
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   134
/******************************************************
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   135
 * Main Digitiser Class
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   136
 ******************************************************/
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   137
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   138
//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   139
// TO DO: (optional)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   140
//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   141
// Add any private functions and data you require
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   142
//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   143
NONSHARABLE_CLASS(DTemplateDigitiser) : public DDigitiser
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   144
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   145
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   146
public:
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   147
	enum TState
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   148
		{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   149
		E_HW_PowerUp,
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   150
		E_HW_PenUpDebounce,
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   151
		E_HW_CollectSample
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   152
		};
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   153
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   154
public:
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   155
	// from DDigitiser - initialisation
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   156
	DTemplateDigitiser();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   157
	virtual TInt DoCreate();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   158
	void SetDefaultConfig();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   159
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   160
	// from DDigitiser - signals to hardware-dependent code
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   161
	virtual void WaitForPenDown();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   162
	virtual void WaitForPenUp();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   163
	virtual void WaitForPenUpDebounce();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   164
	virtual void DigitiserOn();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   165
	virtual void DigitiserOff();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   166
	virtual void FilterPenMove(const TPoint& aPoint);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   167
	virtual void ResetPenMoveFilter();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   168
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   169
	// from DDigitiser - machine-configuration related things
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   170
	virtual TInt DigitiserToScreen(const TPoint& aDigitiserPoint, TPoint& aScreenPoint);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   171
	virtual void ScreenToDigitiser(TInt& aX, TInt& aY);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   172
	virtual TInt SetXYInputCalibration(const TDigitizerCalibration& aCalibration);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   173
	virtual TInt CalibrationPoints(TDigitizerCalibration& aCalibration);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   174
	virtual TInt SaveXYInputCalibration();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   175
	virtual TInt RestoreXYInputCalibration(TDigitizerCalibrationType aType);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   176
	virtual void DigitiserInfo(TDigitiserInfoV01& aInfo);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   177
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   178
	// from DPowerHandler
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   179
	virtual void PowerDown(TPowerState);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   180
	virtual void PowerUp();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   181
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   182
public:
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   183
	// implementation
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   184
	void TakeSample();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   185
	void PenInterrupt();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   186
	void DigitiserPowerUp();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   187
	void DoPowerUp();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   188
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   189
private:
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   190
	static void TimerCallback(TAny* aPtr);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   191
	static void TimerIntCallback(TAny* aPtr);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   192
	static void TakeReadingDfc(TAny* aPtr);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   193
	static void PowerUpDfc(TAny* aPtr);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   194
	static void PowerDownDfc(TAny* aPtr);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   195
	static void PenIsr(TAny* aPtr);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   196
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   197
	TouchController iController;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   198
	NTimer iTimer;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   199
	NTimer iTimerInt;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   200
	TDfc iTakeReadingDfc;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   201
	TDfc iPowerDownDfc;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   202
	TDfc iPowerUpDfc;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   203
	TInt iSamplesCount;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   204
	TState iState;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   205
	TUint8 iPoweringDown;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   206
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   207
	TSize iScreenSize;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   208
	TActualMachineConfig& iMachineConfig;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   209
	};
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   210
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   211
/******************************************************
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   212
 * Digitiser main code
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   213
 ******************************************************/
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   214
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   215
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   216
/**
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   217
Creates a new instance of DDigitiser.
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   218
Called by extension entry point (PIL) to create a DDigitiser-derived object.
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   219
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   220
@return	a pointer to a DTemplateDigitiser object
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   221
*/
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   222
DDigitiser* DDigitiser::New()
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   223
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   224
	return new DTemplateDigitiser;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   225
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   226
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   227
DTemplateDigitiser::DTemplateDigitiser() :
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   228
		iTimer(TimerCallback,this),
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   229
		iTimerInt(TimerIntCallback,this),
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   230
		iTakeReadingDfc(TakeReadingDfc,this,5),
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   231
		iPowerDownDfc(PowerDownDfc,this,5),
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   232
		iPowerUpDfc(PowerUpDfc,this,5),
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   233
		iMachineConfig(TheActualMachineConfig())
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   234
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   235
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   236
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   237
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   238
TInt DTemplateDigitiser::DoCreate()
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   239
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   240
	__KTRACE_OPT(KEXTENSION,Kern::Printf("DTemplateDigitiser::DoCreate"));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   241
	DEBUG_PRINT(Kern::Printf("DTemplateDigitiser::DoCreate"));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   242
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   243
	if (Kern::ColdStart())
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   244
		{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   245
		__KTRACE_OPT(KEXTENSION,Kern::Printf("Resetting digitiser calibration"));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   246
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   247
		// Emergency digitiser calibration values
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   248
		iMachineConfig.iCalibration.iR11 = KConfigXyR11;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   249
		iMachineConfig.iCalibration.iR12 = KConfigXyR12;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   250
		iMachineConfig.iCalibration.iR21 = KConfigXyR21;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   251
		iMachineConfig.iCalibration.iR22 = KConfigXyR22;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   252
		iMachineConfig.iCalibration.iTx = KConfigXyTx;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   253
		iMachineConfig.iCalibration.iTy = KConfigXyTy;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   254
		}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   255
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   256
	// create a DFCQ for this driver
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   257
	TInt r = Kern::DfcQCreate(iDfcQ, KXyinThreadPriority, &KXyinThreadName);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   258
	if(r != KErrNone)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   259
		{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   260
		__KTRACE_OPT(KIIC, Kern::Printf("Digitizer: DFC Queue creation failed, ch: %d, r = %d\n", r));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   261
		return r;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   262
		}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   263
	iTakeReadingDfc.SetDfcQ(iDfcQ);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   264
	iPowerDownDfc.SetDfcQ(iDfcQ);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   265
	iPowerUpDfc.SetDfcQ(iDfcQ);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   266
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   267
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   268
#ifdef USE_SYMBIAN_PRM
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   269
	// register power handler
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   270
	Add();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   271
#endif
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   272
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   273
	// setup the DAV (data ready/available) pin by binding to the GPIO pin..
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   274
	r = GPIO::BindInterrupt(KDataReadyPin, PenIsr, this);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   275
	if(r != KErrNone)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   276
		{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   277
		Kern::Printf("GPIO::BindInterrupt() failed for pin %d, r=%d", KDataReadyPin, r);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   278
		return r;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   279
		}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   280
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   281
	r = GPIO::SetPinDirection(KDataReadyPin, GPIO::EInput);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   282
	if(r == KErrNone)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   283
		{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   284
		r = GPIO::SetInterruptTrigger(KDataReadyPin, GPIO::EEdgeRising);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   285
		if(r == KErrNone)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   286
			{
95
450a8cf0c020 updated byd touch controller handling. needs debugging and update.
Lukasz Forynski <lukasz.forynski@gmail.com>
parents: 85
diff changeset
   287
			GPIO::SetDebounceTime(KDataReadyPin, 100);
85
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   288
			SCM::SetPadConfig(CONTROL_PADCONF_MMC2_DAT0, SCM::EMsw, SCM::EMode4 | SCM::EInputEnable); // 133 (mmc2dat1)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   289
			r = GPIO::SetPinMode(KDataReadyPin, GPIO::EEnabled);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   290
			}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   291
		}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   292
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   293
	if (r == KErrNone)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   294
		{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   295
		// set up the default configuration
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   296
		SetDefaultConfig();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   297
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   298
		// some of the pre-configuration of the touch controller could be done here..
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   299
		iController.HardReset();
95
450a8cf0c020 updated byd touch controller handling. needs debugging and update.
Lukasz Forynski <lukasz.forynski@gmail.com>
parents: 85
diff changeset
   300
		iController.Configure(TouchController::EModeSingle);
85
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   301
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   302
		DigitiserPowerUp();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   303
		}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   304
	return r;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   305
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   306
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   307
/**
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   308
Initialise the DDigitiser::iCfg structure
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   309
*/
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   310
void DTemplateDigitiser::SetDefaultConfig()
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   311
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   312
	iCfg.iPenDownDiscard = KConfigXyPenDownDiscard;		// number of samples to discard on pen-down
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   313
	iCfg.iPenUpDiscard = KConfigXyPenUpDiscard;			// number of samples to discard on pen-up
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   314
	iCfg.iDriveXRise = KConfigXyDriveXRise;				// number of milliseconds to wait when driving horizontal edges
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   315
	iCfg.iDriveYRise = KConfigXyDriveYRise;				// number of milliseconds to wait when driving vertical edges
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   316
	iCfg.iMinX = KConfigXyMinX;							// minimum valid X value
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   317
	iCfg.iMaxX = KConfigXyMaxX;							// maximum valid X value
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   318
	iCfg.iSpreadX = KConfigXySpreadX;					// maximum valid X spread
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   319
	iCfg.iMinY = KConfigXyMinY;							// minimum valid Y value
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   320
	iCfg.iMaxY = KConfigXyMaxY;							// maximum valid Y value
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   321
	iCfg.iSpreadY = KConfigXySpreadY;					// maximum valid Y spread
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   322
	iCfg.iMaxJumpX = KConfigXyMaxJumpX;					// maximum X movement per sample (pixels)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   323
	iCfg.iMaxJumpY = KConfigXyMaxJumpY;					// maximum Y movement per sample (pixels)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   324
	iCfg.iAccThresholdX = KConfigXyAccThresholdX;		// offset in pixels to cause movement in X direction
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   325
	iCfg.iAccThresholdY = KConfigXyAccThresholdY;		// offset in pixels to cause movement in Y direction
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   326
	iCfg.iNumXYSamples = KConfigXyNumXYSamples;			// number of samples to average
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   327
	iCfg.iDisregardMinMax = KConfigXyDisregardMinMax;	// disregard extremal values in each 4-sample group
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   328
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   329
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   330
/**
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   331
Takes a sample from the digitiser.
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   332
Called in the context of a DFC thread.
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   333
*/
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   334
void DTemplateDigitiser::TakeSample()
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   335
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   336
#ifdef USE_SYMBIAN_PRM
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   337
	TTemplatePowerController::WakeupEvent();	// notify of pendown (wakeup event) and let the power controller sort
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   338
							 					// out if it needs propagation
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   339
#endif
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   340
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   341
	// TO DO: (mandatory)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   342
	// Read from appropriate hardware register to determine whether digitiser panel is being touched
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   343
	// Set penDown to ETrue if touched or EFalse if not touched.
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   344
	//
95
450a8cf0c020 updated byd touch controller handling. needs debugging and update.
Lukasz Forynski <lukasz.forynski@gmail.com>
parents: 85
diff changeset
   345
	TPoint points[4];
450a8cf0c020 updated byd touch controller handling. needs debugging and update.
Lukasz Forynski <lukasz.forynski@gmail.com>
parents: 85
diff changeset
   346
	TInt num_points = 0;
450a8cf0c020 updated byd touch controller handling. needs debugging and update.
Lukasz Forynski <lukasz.forynski@gmail.com>
parents: 85
diff changeset
   347
	TInt r = iController.GetMeasurements(points, num_points);
450a8cf0c020 updated byd touch controller handling. needs debugging and update.
Lukasz Forynski <lukasz.forynski@gmail.com>
parents: 85
diff changeset
   348
	Kern::Printf("Num touches: %d", num_points);
450a8cf0c020 updated byd touch controller handling. needs debugging and update.
Lukasz Forynski <lukasz.forynski@gmail.com>
parents: 85
diff changeset
   349
	Kern::Printf("Measurments: (r: %d)", r);
450a8cf0c020 updated byd touch controller handling. needs debugging and update.
Lukasz Forynski <lukasz.forynski@gmail.com>
parents: 85
diff changeset
   350
	for(TInt i = 0; i < num_points; i++)
450a8cf0c020 updated byd touch controller handling. needs debugging and update.
Lukasz Forynski <lukasz.forynski@gmail.com>
parents: 85
diff changeset
   351
		{
450a8cf0c020 updated byd touch controller handling. needs debugging and update.
Lukasz Forynski <lukasz.forynski@gmail.com>
parents: 85
diff changeset
   352
		Kern::Printf("%d: iX: %d, iY: %d",i, points[i].iX, points[i].iY);
450a8cf0c020 updated byd touch controller handling. needs debugging and update.
Lukasz Forynski <lukasz.forynski@gmail.com>
parents: 85
diff changeset
   353
		}
85
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   354
95
450a8cf0c020 updated byd touch controller handling. needs debugging and update.
Lukasz Forynski <lukasz.forynski@gmail.com>
parents: 85
diff changeset
   355
	TInt penDown = num_points;
450a8cf0c020 updated byd touch controller handling. needs debugging and update.
Lukasz Forynski <lukasz.forynski@gmail.com>
parents: 85
diff changeset
   356
450a8cf0c020 updated byd touch controller handling. needs debugging and update.
Lukasz Forynski <lukasz.forynski@gmail.com>
parents: 85
diff changeset
   357
	//	DEBUG_PRINT(Kern::Printf("TS: S%d PD%d Sp%d", (TInt)iState, penDown?1:0, iSamplesCount));
450a8cf0c020 updated byd touch controller handling. needs debugging and update.
Lukasz Forynski <lukasz.forynski@gmail.com>
parents: 85
diff changeset
   358
85
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   359
	if (iState==E_HW_PowerUp)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   360
		{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   361
		// waiting for pen to go up after switch on due to pen down or through the HAL
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   362
		// coverity[dead_error_condition]
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   363
		// The next line should be reachable when this template file is edited for use
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   364
		if (!penDown)							// pen has gone up -> transition to new state
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   365
			{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   366
			iState=E_HW_CollectSample;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   367
			iSamplesCount=0;						// reset sample buffer
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   368
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   369
			// TO DO: (mandatory)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   370
			// Write to the appropriate hardware register to clear the digitiser interrupt
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   371
			//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   372
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   373
			// TO DO: (mandatory)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   374
			// Write to the appropriate hardware register(s) to allow the hardware
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   375
			// to detect when the digitizer panel is touched
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   376
			//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   377
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   378
//			Interrupt::Enable(KIntIdDigitiser);		// enable pen-down interrupt
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   379
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   380
 			// TO DO: (mandatory)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   381
			// Write to the appropriate hardware register to enable the digitiser interrupt
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   382
			//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   383
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   384
			}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   385
		else									// pen is still down, wait a bit longer in this state
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   386
			{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   387
			iTimer.OneShot(KPenUpPollTime);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   388
			}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   389
		return;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   390
		}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   391
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   392
	if (!penDown)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   393
		{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   394
		if (iState==E_HW_PenUpDebounce)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   395
			{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   396
			iState=E_HW_CollectSample;	// back to initial state, no samples collected
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   397
			iSamplesCount=0;			// reset sample buffer
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   398
			// Need to lock the kernel to simulate ISR context and thus defer preemption,
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   399
			// since PenUp() expects an ISR context and calls TDfc::Add().
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   400
			NKern::Lock();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   401
			PenUp();					// adds DFC
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   402
			NKern::Unlock();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   403
			}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   404
		else							// iState=E_HW_CollectSample
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   405
			{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   406
			iState=E_HW_PenUpDebounce;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   407
			iTimer.OneShot(KPenUpDebounceTime);		// wait a bit to make sure pen still up
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   408
			}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   409
		return;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   410
		}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   411
	else if (iState==E_HW_PenUpDebounce)	// pen down
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   412
		{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   413
		// false alarm - pen is down again
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   414
		iState=E_HW_CollectSample;		// take a new set of samples
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   415
		iSamplesCount=0;				// reset sample buffer
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   416
		}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   417
	// default: pen down and iState=E_HW_CollectSample
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   418
	// TO DO: (mandatory)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   419
	// Read from appropriate hardware register to get the current digitiser coordinates
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   420
	// of the point that is being touched. Set aResults accordingly.
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   421
	// This is only example code... you need to modify it for your hardware
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   422
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   423
	TPoint aResults;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   424
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   425
	// X axis
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   426
	iX[iSamplesCount] = aResults.iX;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   427
	// Y axis
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   428
	iY[iSamplesCount] = aResults.iY;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   429
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   430
	DEBUG_PRINT(Kern::Printf("Raw: X=%d Y=%d",iX[iSamplesCount],iY[iSamplesCount]));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   431
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   432
	// Put the hardware back into pen-detect mode
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   433
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   434
	// TO DO: (mandatory)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   435
	// Write to the appropriate hardware register(s) to allow the hardware
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   436
	// to detect when the digitizer panel is touched
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   437
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   438
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   439
	// count samples collected - if it's less than minimum,
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   440
	// schedule the reading of another sample
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   441
	if (++iSamplesCount < iCfg.iNumXYSamples)	// iX[] and iY[] are 4 levels deep in xyin.h...
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   442
		{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   443
		if(KInterSampleTime > 0)				// need to check this config param as it might be zero!
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   444
			iTimer.OneShot(KInterSampleTime);	// haven't got a complete group yet, so queue timer to sample again
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   445
		else
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   446
			iTakeReadingDfc.Enque();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   447
		return;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   448
		}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   449
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   450
	// Have a complete group of samples so pass up to processing layer (PIL)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   451
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   452
	// Need to lock the kernel to simulate ISR context and thus defer preemption,
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   453
	// since RawSampleValid() expects an ISR context and calls TDfc::Add().
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   454
	NKern::Lock();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   455
	RawSampleValid();		// adds DFC
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   456
	NKern::Unlock();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   457
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   458
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   459
/**
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   460
Request for an interrupt to be generated when the pen is next down
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   461
Called by PIL at startup or when pen leaves digitiser after pen-up event issued
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   462
*/
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   463
void DTemplateDigitiser::WaitForPenDown()
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   464
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   465
	// Called at startup or when pen leaves digitiser after pen-up event issued
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   466
	DEBUG_PRINT(Kern::Printf("WD: PowerDownMask %x",iPoweringDown));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   467
	if (iPoweringDown)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   468
		{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   469
		// powering down
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   470
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   471
		// TO DO: (mandatory)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   472
		// Write to the appropriate hardware register(s) to allow the hardware
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   473
		// to detect when the digitizer panel is touched and wakes up the system if in standby
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   474
		//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   475
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   476
		//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   477
		// TO DO: (optional)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   478
		//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   479
		// Relinquish request on power resources
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   480
		// This will place the peripheral hardware in a low power "Sleep" mode which is Interrupt detection capable
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   481
		// EXAMPLE ONLY
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   482
#ifdef USE_SYMBIAN_PRM
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   483
		TemplateResourceManager* aManager = TTemplatePowerController::ResourceManager();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   484
		aManager -> ModifyToLevel(TemplateResourceManager::AsynchMlResourceUsedByXOnly, 50 /* a percentage */);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   485
		aManager -> SharedBResource1() -> Release();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   486
#endif
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   487
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   488
		iPoweringDown = EFalse;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   489
		PowerDownDone();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   490
		}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   491
	else
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   492
		{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   493
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   494
		// TO DO: (mandatory)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   495
		// Write to the appropriate hardware register to clear the digitiser interrupt
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   496
		//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   497
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   498
		// TO DO: (mandatory)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   499
		// Write to the appropriate hardware register(s) to allow the hardware
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   500
		// to detect when the digitizer panel is touched
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   501
		//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   502
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   503
		if ((iTimer.iState == NTimer::EIdle) && (iTimerInt.iState == NTimer::EIdle))
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   504
			{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   505
			GPIO::EnableInterrupt(KDataReadyPin); // enable pen-down interrupt
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   506
			}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   507
		}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   508
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   509
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   510
/**
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   511
Called by PIL after it has processed a group of raw samples while pen is down.
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   512
Used to indicate that the iX, iY buffers may be re-used
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   513
*/
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   514
void DTemplateDigitiser::WaitForPenUp()
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   515
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   516
	DEBUG_PRINT(Kern::Printf("WU"));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   517
	iState = E_HW_CollectSample;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   518
	iSamplesCount = 0;					// reset sample buffer
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   519
	if(KInterGroupTime > 0)				// need to check this config param as it might be zero!
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   520
		{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   521
		iTimer.OneShot(KInterGroupTime);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   522
		}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   523
	else
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   524
		{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   525
		iTakeReadingDfc.Enque();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   526
		}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   527
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   528
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   529
/**
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   530
Called by PIL if the group of samples collected is not good enough
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   531
Used to indicate that the iX, iY buffers may be re-used
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   532
*/
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   533
void DTemplateDigitiser::WaitForPenUpDebounce()
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   534
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   535
	DEBUG_PRINT(Kern::Printf("WUDB"));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   536
	iState = E_HW_CollectSample;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   537
	iSamplesCount = 0;			// reset sample buffer
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   538
	if(KInterGroupTime > 0)					// need to check this config param as it might be zero!
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   539
		iTimer.OneShot(KInterGroupTime);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   540
	else
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   541
		iTakeReadingDfc.Enque();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   542
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   543
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   544
/**
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   545
Pen up/down interrupt service routine (ISR)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   546
*/
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   547
static TUint IsrCnt = 0;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   548
void DTemplateDigitiser::PenInterrupt()
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   549
    {
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   550
	DEBUG_PRINT(Kern::Printf("I: %d  ", IsrCnt++));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   551
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   552
//	Interrupt::Clear(KIntIdDigitiser);	// should already have been cleared
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   553
//	GPIO::DisableInterrupt(KDataReadyPin);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   554
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   555
	// TO DO: (mandatory)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   556
	// Read from appropriate hardware register to determine whether digitiser panel is being touched
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   557
	// Set penDown to ETrue if touched or EFalse if not touched.
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   558
	// This is only example code... you need to modify it for your hardware
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   559
//	GPIO::DisableInterrupt(KDataReadyPin);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   560
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   561
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   562
//	TBool penDown = iController.NumOfTouches();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   563
	TBool penDown = 1;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   564
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   565
	// coverity[dead_error_condition]
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   566
	if(!penDown)					// pen up
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   567
		{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   568
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   569
		// TO DO: (mandatory)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   570
		// Write to the appropriate hardware register to clear the digitiser interrupt
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   571
		//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   572
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   573
		// TO DO: (mandatory)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   574
		// Write to the appropriate hardware register(s) to allow the hardware
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   575
		// to detect when the digitizer panel is touched
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   576
		//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   577
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   578
		return;						// ... and exit!
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   579
		}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   580
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   581
//	Interrupt::Disable(KIntIdDigitiser);		// do NOT disable the capability to generate interrupts at the source
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   582
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   583
    // Add the timing of pen interrupts as entropy data for the RNG
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   584
//	Interrupt::AddTimingEntropy();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   585
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   586
	if(0)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   587
//	if (KPenDownDelayTime>0)					// need to check this config param as it might be zero!
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   588
		{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   589
		iTimerInt.OneShot(KPenDownDelayTime);	// start a debounce timer which will queue a DFC to process the interrupt
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   590
		}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   591
	else
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   592
		{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   593
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   594
		// TO DO: (mandatory)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   595
		// Write to the appropriate hardware register to clear the digitiser interrupt
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   596
		// This will re-trigger the interrupt mechanism to catch the next interrupt...
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   597
		//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   598
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   599
		iTakeReadingDfc.Add();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   600
		}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   601
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   602
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   603
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   604
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   605
void DTemplateDigitiser::TimerCallback(TAny* aPtr)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   606
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   607
	DTemplateDigitiser* pD=(DTemplateDigitiser*)aPtr;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   608
	DEBUG_PRINT(Kern::Printf("T"));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   609
	pD->iTakeReadingDfc.Add();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   610
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   611
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   612
/**
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   613
Debounce timer callback
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   614
schedules a DFC to process a pen-down interrupt
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   615
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   616
@param aPtr	a pointer to DTemplateDigitiser
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   617
*/
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   618
void DTemplateDigitiser::TimerIntCallback(TAny* aPtr)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   619
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   620
	DTemplateDigitiser* pD=(DTemplateDigitiser*)aPtr;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   621
	DEBUG_PRINT(Kern::Printf("TI"));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   622
//	GPIO::DisableInterrupt(KDataReadyPin);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   623
	// clear xy interrupt -> re-triggers the interrupt mechanism to catch the next IRQ
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   624
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   625
	// TO DO: (mandatory)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   626
	// Write to the appropriate hardware register to clear the digitiser interrupt
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   627
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   628
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   629
	pD->iTakeReadingDfc.Add();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   630
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   631
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   632
/**
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   633
Pen-up/down interrupt handler
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   634
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   635
@param aPtr	a pointer to DTemplateDigitiser
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   636
*/
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   637
void DTemplateDigitiser::PenIsr(TAny* aPtr)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   638
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   639
	DTemplateDigitiser* pD=(DTemplateDigitiser*)aPtr;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   640
	pD->PenInterrupt();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   641
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   642
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   643
/**
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   644
DFC for taking a sample
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   645
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   646
@param aPtr	a pointer to DTemplateDigitiser
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   647
*/
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   648
void DTemplateDigitiser::TakeReadingDfc(TAny* aPtr)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   649
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   650
	DTemplateDigitiser* pD=(DTemplateDigitiser*)aPtr;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   651
	pD->TakeSample();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   652
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   653
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   654
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   655
void DTemplateDigitiser::PowerUp()
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   656
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   657
	iPowerUpDfc.Enque();			// queue a DFC in this driver's context
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   658
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   659
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   660
void DTemplateDigitiser::PowerUpDfc(TAny* aPtr)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   661
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   662
	DTemplateDigitiser* pD=(DTemplateDigitiser*)aPtr;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   663
	pD->DoPowerUp();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   664
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   665
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   666
void DTemplateDigitiser::DoPowerUp()
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   667
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   668
	__KTRACE_OPT(KPOWER, Kern::Printf("DTemplateDigitiser::PowerUpDfc()"));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   669
	DigitiserOn();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   670
	PowerUpDone();			// must be called from a different thread than PowerUp()
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   671
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   672
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   673
/**
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   674
Turn the digitiser on
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   675
May be called as a result of a power transition or from the HAL
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   676
If called from HAL, then the digitiser may be already be on (iPointerOn == ETrue)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   677
*/
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   678
void DTemplateDigitiser::DigitiserOn()
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   679
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   680
	__KTRACE_OPT(KPOWER,Kern::Printf("DTemplateDigitiser::DigitiserOn() iPointerOn=%d", iPointerOn));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   681
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   682
	if (!iPointerOn)				// may have been powered up already
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   683
		DigitiserPowerUp();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   684
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   685
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   686
/**
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   687
Power-up the digitiser. Assumes digitiser is off.
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   688
*/
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   689
void DTemplateDigitiser::DigitiserPowerUp()
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   690
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   691
	__KTRACE_OPT(KPOWER, Kern::Printf("DigitiserPowerUp"));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   692
	iPointerOn = ETrue;		// now turned on
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   693
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   694
	// TO DO: (mandatory)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   695
	// Write to the appropriate hardware register to clear the digitiser interrupt
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   696
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   697
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   698
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   699
	// TO DO: (optional)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   700
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   701
	// Reassert request on power resources
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   702
	// This will move the peripheral hardware out of low power "Sleep" mode back to fully operational
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   703
	// EXAMPLE ONLY
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   704
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   705
#ifdef USE_SYMBIAN_PRM
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   706
	TemplateResourceManager* aManager = TTemplatePowerController::ResourceManager();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   707
	aManager -> ModifyToLevel(TemplateResourceManager::AsynchMlResourceUsedByXOnly, 100 /* a percentage */);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   708
	aManager -> SharedBResource1() -> Use();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   709
#endif
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   710
	// TO DO: (mandatory)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   711
	// Write to the appropriate hardware register(s) to allow the hardware
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   712
	// to detect when the digitizer panel is touched
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   713
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   714
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   715
	iState = E_HW_PowerUp;	// so we wait for pen up if necessary
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   716
	iTakeReadingDfc.Enque();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   717
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   718
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   719
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   720
void DTemplateDigitiser::PowerDown(TPowerState /*aPowerState*/)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   721
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   722
	iPoweringDown = ETrue;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   723
	iPowerDownDfc.Enque();						// queue a DFC in this driver's context
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   724
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   725
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   726
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   727
void DTemplateDigitiser::PowerDownDfc(TAny* aPtr)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   728
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   729
	DTemplateDigitiser* pD=(DTemplateDigitiser*)aPtr;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   730
	pD->DigitiserOff();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   731
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   732
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   733
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   734
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   735
/**
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   736
Turn the digitiser off
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   737
May be called as a result of a power transition or from the HAL
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   738
If called from Power Manager, then the digitiser may be already be off (iPointerOn == EFalse)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   739
if the platform is in silent running mode
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   740
*/
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   741
void DTemplateDigitiser::DigitiserOff()
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   742
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   743
	__KTRACE_OPT(KPOWER,Kern::Printf("DTemplateDigitiser::DigitiserOff() iPointerOn=%d", iPointerOn));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   744
	if (iPointerOn)		// can have been powered down from HAL
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   745
		{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   746
		iPointerOn = EFalse;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   747
//		Interrupt::Disable(KIntIdDigitiser);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   748
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   749
		// TO DO: (mandatory)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   750
		// Write to the appropriate hardware register to disable the digitiser interrupt
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   751
		//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   752
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   753
		iTimer.Cancel();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   754
		iTimerInt.Cancel();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   755
		iTakeReadingDfc.Cancel();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   756
		if (iState != E_HW_CollectSample)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   757
			{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   758
			// Need to lock the kernel to simulate ISR context and thus defer preemption,
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   759
			// since PenUp() expects an ISR context and calls TDfc::Add().
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   760
			NKern::Lock();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   761
			PenUp();		// adds DFC (will call WaitForPenDown)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   762
			NKern::Unlock();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   763
			}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   764
		else
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   765
			{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   766
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   767
			// TO DO: (mandatory)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   768
			// Write to the appropriate hardware register(s) to allow the hardware
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   769
			// to detect when the digitizer panel is touched and wakes up the system if in standby
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   770
			//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   771
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   772
			//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   773
			// TO DO: (optional)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   774
			//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   775
			// Relinquish request on power resources as we are being powered down
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   776
			// This will place the peripheral hardware in a low power "Sleep" mode which is Interrupt detection capable
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   777
			// EXAMPLE ONLY
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   778
			//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   779
#ifdef USE_SYMBIAN_PRM
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   780
			TemplateResourceManager* aManager = TTemplatePowerController::ResourceManager();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   781
			aManager -> ModifyToLevel(TemplateResourceManager::AsynchMlResourceUsedByXOnly, 0 /* a percentage */);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   782
			aManager -> SharedBResource1() -> Release();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   783
#endif
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   784
			if (iPoweringDown)			// came here through PowerDown
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   785
				{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   786
				iPoweringDown = EFalse;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   787
				PowerDownDone();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   788
				}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   789
			}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   790
		}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   791
	else	// already powered down (by HAL)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   792
		{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   793
			if (iPoweringDown)			// came here through PowerDown
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   794
				{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   795
				iPoweringDown = EFalse;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   796
				PowerDownDone();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   797
				}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   798
		}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   799
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   800
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   801
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   802
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   803
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   804
/**
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   805
Convert digitiser coordinates to screen coordinates
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   806
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   807
@param aDigitiserPoint the digitiser coordinates
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   808
@param aScreenPoint A TPoint supplied by the caller.
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   809
					On return, set to the converted screen coordinates in pixels.
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   810
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   811
@return KErrNone if successful
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   812
*/
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   813
TInt DTemplateDigitiser::DigitiserToScreen(const TPoint& aDigitiserPoint, TPoint& aScreenPoint)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   814
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   815
	NKern::LockSystem();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   816
	TInt R11 = iMachineConfig.iCalibration.iR11;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   817
	TInt R12 = iMachineConfig.iCalibration.iR12;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   818
	TInt R21 = iMachineConfig.iCalibration.iR21;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   819
	TInt R22 = iMachineConfig.iCalibration.iR22;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   820
	TInt TX = iMachineConfig.iCalibration.iTx;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   821
	TInt TY = iMachineConfig.iCalibration.iTy;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   822
	NKern::UnlockSystem();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   823
	TInt X = aDigitiserPoint.iX;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   824
	TInt Y = aDigitiserPoint.iY;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   825
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   826
	aScreenPoint.iX = (X*R11 + Y*R21 + TX) >> 16;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   827
	aScreenPoint.iY = (X*R12 + Y*R22 + TY) >> 16;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   828
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   829
	DEBUG_PRINT(Kern::Printf("DtS: Dp.x %d, Dp.y %d, Sp.x %d, Sp.y %d", X,Y,aScreenPoint.iX,aScreenPoint.iY));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   830
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   831
	return KErrNone;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   832
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   833
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   834
/**
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   835
Convert screen coordinates back into digitiser coordinates
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   836
using the current constants from the superpage
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   837
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   838
@param aX The screen X coordinate in pixels; On return, set to the digitiser X coordinate.
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   839
@param aY The screen Y coordinate in pixels; On return, set to the digitiser Y coordinate.
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   840
*/
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   841
void DTemplateDigitiser::ScreenToDigitiser(TInt& aX, TInt& aY)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   842
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   843
	NKern::LockSystem();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   844
	Int64 R11 = iMachineConfig.iCalibration.iR11;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   845
	Int64 R12 = iMachineConfig.iCalibration.iR12;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   846
	Int64 R21 = iMachineConfig.iCalibration.iR21;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   847
	Int64 R22 = iMachineConfig.iCalibration.iR22;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   848
	Int64 TX = iMachineConfig.iCalibration.iTx;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   849
	Int64 TY = iMachineConfig.iCalibration.iTy;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   850
	NKern::UnlockSystem();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   851
	Int64 X = aX;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   852
	Int64 Y = aY;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   853
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   854
	// Xd=(Xs<<16)*R22-(Ys<<16)*R21-(TX*R22)+(TY*R21)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   855
	//	  -------------------------------------------
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   856
	//				   (R22*R11)-(R21*R12)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   857
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   858
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   859
	// Yd=(Xs<<16)*R12-(Ys<<16)*R11-(TX*R12)+(TY*R11)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   860
	//	  -------------------------------------------
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   861
	//				   (R21*R12)-(R22*R11)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   862
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   863
	// where Xd and Yd are digitiser coordinates
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   864
	//		 Xs and Ys are supplied screen coordinates
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   865
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   866
	X<<=16;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   867
	Y<<=16;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   868
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   869
	Int64 d=Int64(R21)*Int64(R12)-Int64(R22)*Int64(R11);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   870
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   871
	Int64 r=(X*R12)-(Y*R11)-(TX*R12)+(TY*R11);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   872
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   873
	r=r/d;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   874
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   875
	aY=(TInt)r;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   876
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   877
	r=(X*R22)-(Y*R21)-(TX*R22)+(TY*R21);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   878
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   879
	r=r/(-d);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   880
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   881
	aX=(TInt)r;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   882
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   883
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   884
/**
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   885
Calculate values for R11, R12, R21, R22, TX and TY
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   886
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   887
@param aCalibration the screen coordinates of points touched
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   888
@return KErrNone if successful
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   889
*/
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   890
TInt DTemplateDigitiser::SetXYInputCalibration(const TDigitizerCalibration& aCalibration)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   891
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   892
	TInt R11,R12,R21,R22,TX,TY;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   893
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   894
	// Get coords of expected points
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   895
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   896
	TDigitizerCalibration cal;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   897
	TInt ret=CalibrationPoints(cal);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   898
	if (ret!=KErrNone)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   899
		return ret;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   900
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   901
	TInt Xp1=cal.iTl.iX;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   902
	TInt Yp1=cal.iTl.iY;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   903
	TInt Xp2=cal.iBl.iX;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   904
	TInt Yp2=cal.iBl.iY;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   905
	TInt Xp3=cal.iBr.iX;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   906
	TInt Yp3=cal.iBr.iY;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   907
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   908
	// Get coords of points touched in screen coordinates
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   909
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   910
	TInt X1=aCalibration.iTl.iX;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   911
	TInt Y1=aCalibration.iTl.iY;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   912
	TInt X2=aCalibration.iBl.iX;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   913
	TInt Y2=aCalibration.iBl.iY;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   914
	TInt X3=aCalibration.iBr.iX;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   915
	TInt Y3=aCalibration.iBr.iY;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   916
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   917
	// Convert back to raw digitiser coordinates
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   918
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   919
	ScreenToDigitiser(X1,Y1);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   920
	ScreenToDigitiser(X2,Y2);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   921
	ScreenToDigitiser(X3,Y3);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   922
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   923
	// (Y1-Y2)(Xp1-Xp3) - (Y1-Y3)(Xp1-Xp2)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   924
	// ----------------------------------- = R11
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   925
	// (Y1-Y2)(X1-X3)	- (Y1-Y3)(X1-X2)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   926
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   927
	Int64 r=((Int64(Y1-Y2)*Int64(Xp1-Xp3))-(Int64(Y1-Y3)*Int64(Xp1-Xp2)));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   928
	r<<=16;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   929
	r/=(Int64(Y1-Y2)*Int64(X1-X3)-Int64(Y1-Y3)*Int64(X1-X2));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   930
	R11=(TInt)r;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   931
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   932
	// (Y1-Y2)(Yp1-Yp3) - (Y1-Y3)(Yp1-Yp2)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   933
	// ----------------------------------- = R12
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   934
	// (Y1-Y2)(X1-X3)	- (Y1-Y3)(X1-X2)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   935
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   936
	r=((Int64(Y1-Y2)*Int64(Yp1-Yp3))-(Int64(Y1-Y3)*Int64(Yp1-Yp2)));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   937
	r<<=16;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   938
	r/=(Int64(Y1-Y2)*Int64(X1-X3)-Int64(Y1-Y3)*Int64(X1-X2));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   939
	R12=(TInt)r;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   940
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   941
	// (X1-X3)(Xp2-Xp3) - (X2-X3)(Xp1-Xp3)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   942
	// ----------------------------------- = R21
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   943
	// (Y2-Y3)(X1-X3)	- (Y1-Y3)(X2-X3)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   944
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   945
	r=(((X1-X3)*(Xp2-Xp3))-((X2-X3)*(Xp1-Xp3)));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   946
	r<<=16;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   947
	r/=(Int64(Y2-Y3)*Int64(X1-X3)-Int64(Y1-Y3)*Int64(X2-X3));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   948
	R21=(TInt)r;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   949
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   950
	// (X1-X3)(Yp2-Yp3) - (X2-X3)(Yp1-Yp3)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   951
	// ----------------------------------- = R22
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   952
	// (Y2-Y3)(X1-X3)	- (Y1-Y3)(X2-X3)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   953
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   954
	r=((Int64(X1-X3)*Int64(Yp2-Yp3))-(Int64(X2-X3)*Int64(Yp1-Yp3)));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   955
	r<<=16;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   956
	r/=(Int64(Y2-Y3)*Int64(X1-X3)-Int64(Y1-Y3)*Int64(X2-X3));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   957
	R22=(TInt)r;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   958
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   959
	// TX = Xp1 - X1*R11 - Y1*R21
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   960
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   961
   TX=(Xp1<<16)-(X1*R11)-(Y1*R21);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   962
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   963
	// TY = Yp1 - X1*R12 - Y1*R22
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   964
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   965
	TY=(Yp1<<16)-(X1*R12)-(Y1*R22);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   966
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   967
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   968
	// Write new values into the superpage
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   969
	//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   970
	NKern::LockSystem();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   971
	iMachineConfig.iCalibration.iR11 = R11;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   972
	iMachineConfig.iCalibration.iR12 = R12;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   973
	iMachineConfig.iCalibration.iR21 = R21;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   974
	iMachineConfig.iCalibration.iR22 = R22;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   975
	iMachineConfig.iCalibration.iTx = TX;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   976
	iMachineConfig.iCalibration.iTy = TY;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   977
	NKern::UnlockSystem();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   978
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   979
	return(KErrNone);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   980
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   981
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   982
/**
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   983
Informs the user-side calibration application where to draw
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   984
the cross-hairs on the screen
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   985
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   986
@param aCalibration On return contains the for points on the screen (in screen coordinates)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   987
					where the cross-hairs should be drawn
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   988
@return KErrNone if succcessful
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   989
*/
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   990
TInt DTemplateDigitiser::CalibrationPoints(TDigitizerCalibration& aCalibration)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   991
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   992
	TVideoInfoV01Buf buf;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   993
	TVideoInfoV01& vidinfo=buf();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   994
	TInt r = Kern::HalFunction(EHalGroupDisplay, EDisplayHalCurrentModeInfo, (TAny*)&buf, NULL);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   995
	if (r!=KErrNone)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   996
		return r;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   997
	iScreenSize=vidinfo.iSizeInPixels;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   998
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
   999
    aCalibration.iBl.iX = aCalibration.iTl.iX = iScreenSize.iWidth/10;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1000
    aCalibration.iTr.iY = aCalibration.iTl.iY = iScreenSize.iHeight/10;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1001
    aCalibration.iBr.iY = aCalibration.iBl.iY = iScreenSize.iHeight-iScreenSize.iHeight/10;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1002
    aCalibration.iTr.iX = aCalibration.iBr.iX = iScreenSize.iWidth-iScreenSize.iWidth/10;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1003
    return r;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1004
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1005
/**
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1006
Saves the digitiser calibration to the persistent machine configuration area
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1007
so that it can be restored after a power-down/up
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1008
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1009
@return KErrNone if succcessful
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1010
*/
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1011
TInt DTemplateDigitiser::SaveXYInputCalibration()
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1012
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1013
	NKern::LockSystem();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1014
	iMachineConfig.iCalibrationSaved = iMachineConfig.iCalibration;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1015
	NKern::UnlockSystem();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1016
	return(KErrNone);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1017
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1018
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1019
/**
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1020
Restores the digitiser calibration from the persistent machine configuration area
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1021
following a power-up
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1022
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1023
@param aType indicates whether to restore factory or saved settings
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1024
@return KErrNone if succcessful
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1025
*/
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1026
TInt DTemplateDigitiser::RestoreXYInputCalibration(TDigitizerCalibrationType aType)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1027
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1028
	TInt r=KErrNone;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1029
	NKern::LockSystem();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1030
	switch (aType)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1031
		{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1032
		case EFactory:
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1033
			iMachineConfig.iCalibration=iMachineConfig.iCalibrationFactory;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1034
			break;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1035
		case ESaved:
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1036
			iMachineConfig.iCalibration=iMachineConfig.iCalibrationSaved;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1037
			break;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1038
		default:
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1039
			r=KErrNotSupported;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1040
			break;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1041
		}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1042
	NKern::UnlockSystem();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1043
	return r;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1044
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1045
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1046
/**
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1047
Gets the digitiser configuration information
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1048
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1049
@param aInfo On return, contains information about the digitiser's dimensions etc.
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1050
*/
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1051
void DTemplateDigitiser::DigitiserInfo(TDigitiserInfoV01& aInfo)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1052
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1053
	__KTRACE_OPT(KEXTENSION,Kern::Printf("DTemplateDigitiser::DigitiserInfo"));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1054
	aInfo.iDigitiserSize.iWidth=KConfigXyWidth;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1055
	aInfo.iDigitiserSize.iHeight=KConfigXyHeight;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1056
	aInfo.iOffsetToDisplay.iX=KConfigXyOffsetX;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1057
	aInfo.iOffsetToDisplay.iY=KConfigXyOffsetY;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1058
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1059
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1060
/**
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1061
Issues a pen move event if the distance from the last point is greater than the threshold
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1062
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1063
@param aPoint the pen position in screen coordinates
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1064
*/
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1065
void DTemplateDigitiser::FilterPenMove(const TPoint& aPoint)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1066
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1067
	TPoint offset=aPoint;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1068
	offset.iX-=iLastPos.iX;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1069
	offset.iY-=iLastPos.iY;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1070
	if (Abs(offset.iX)>=iCfg.iAccThresholdX || Abs(offset.iY)>=iCfg.iAccThresholdY)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1071
		{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1072
		iLastPos=aPoint;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1073
		IssuePenMoveEvent(aPoint);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1074
		}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1075
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1076
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1077
/**
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1078
Reset the pen move filter
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1079
*/
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1080
void DTemplateDigitiser::ResetPenMoveFilter()
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1081
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1082
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
Lukasz Forynski <lukasz.forynski@gmail.com>
parents:
diff changeset
  1083