omap3530/beagle_drivers/byd_touch/common/controller.cpp
author Lukasz Forynski <lukasz.forynski@gmail.com>
Thu, 07 Oct 2010 00:37:22 +0100
branchBeagle_BSP_dev
changeset 85 d93b485c1325
child 95 450a8cf0c020
permissions -rw-r--r--
updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(chip) works. Submitting in order to share whatever there was-prior to going for holiday
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
// 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
     2
// 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
     3
// 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
     4
// 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
     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
     6
// 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
     7
// lukasz.forynski@gmail.com
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
// 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
    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
// 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
    12
// omap3530/beagle_drivers/byd_touch/common/controller.cpp
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
//
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
#include <drivers/iic.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
    15
#include <drivers/iic_channel.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
    16
#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
    17
#include "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
    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
//#define VERBOSE_DEBUG
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
#ifdef VERBOSE_DEBUG
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
#define LOG_FUNCTION_CALL Kern::Printf("%s()", __FUNCTION__)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
#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
    23
#define LOG_FUNCTION_CALL
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
#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
    25
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
TTouchControllerInterface::TTouchControllerInterface() :
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	iSpiTransactionHeader(KHeader),
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	iSpiTxTransfer(TIicBusTransfer::EMasterWrite, KBufGranulatity, &iSpiWriteBuffer),
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	iSpiRxTransfer(TIicBusTransfer::EMasterRead, KBufGranulatity, &iSpiReadBuffer),
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	iSpiTransaction(&iSpiTransactionHeader, &iSpiTxTransfer)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	// after all above - make the transaction full duplex using the Rx 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
    33
	iSpiTransaction.SetFullDuplexTrans(&iSpiRxTransfer);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	// set buffer length only once..
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	iSpiWriteBuffer.SetLength(iSpiWriteBuffer.MaxLength());
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	iSpiReadBuffer.SetLength(iSpiReadBuffer.MaxLength());
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	// and set SPI addressing / bus 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
    40
	iSpiBusId = 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
    41
	SET_BUS_TYPE(iSpiBusId, DIicBusChannel::ESpi);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	SET_CHAN_NUM(iSpiBusId, KSpiModule);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	SET_SLAVE_ADDR(iSpiBusId, KSpiSlaveAddr);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
TInt TTouchControllerInterface::Read(TUint8 aRegAddress, TUint8& aValue)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	LOG_FUNCTION_CALL;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	iSpiWriteBuffer[0] = KReadCommand;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	iSpiWriteBuffer[1] = aRegAddress;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	iSpiWriteBuffer[2] = 0; // TODO - might not be needed..
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
#ifdef VERBOSE_DEBUG
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	for (int i = 0; i <KSpiPacketLength; i++)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
		Kern::Printf("R0[i]: %d", iSpiReadBuffer[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
    55
#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
    56
	TInt r = IicBus::QueueTransaction(iSpiBusId, &iSpiTransaction);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	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
    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
		aValue = iSpiReadBuffer[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
    60
		}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
#ifdef VERBOSE_DEBUG
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	for (int i = 0; i <KSpiPacketLength; i++)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
		Kern::Printf("R1[i]: %d", iSpiReadBuffer[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
    64
#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
    65
	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
    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
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
TInt TTouchControllerInterface::Write(TUint8 aRegAddress, TUint8 aValue)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	LOG_FUNCTION_CALL;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	iSpiWriteBuffer[0] = KWriteCommand;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	iSpiWriteBuffer[1] = aRegAddress;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	iSpiWriteBuffer[2] = aValue;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
#ifdef VERBOSE_DEBUG
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	for (int i = 0; i < 3; i++)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
		Kern::Printf("WR0[i]: %d", iSpiWriteBuffer[i]);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	for (int i = 0; i <KSpiPacketLength; i++)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
		Kern::Printf("W0[i]: %d", iSpiReadBuffer[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
    81
#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
    82
	TInt r = IicBus::QueueTransaction(iSpiBusId, &iSpiTransaction);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
#ifdef VERBOSE_DEBUG
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	for (int i = 0; i <KSpiPacketLength; i++)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
		Kern::Printf("W1[i]: %d", iSpiReadBuffer[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
    87
#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
    88
	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
    89
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
// Touch controller
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
TouchController::TouchController() :
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	iCallback(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
    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
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
TouchController::TouchController(TVoidCallback aCallback) :
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	iCallback(aCallback)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
TInt TouchController::HardReset()
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	LOG_FUNCTION_CALL;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	TInt r = GPIO::SetPinMode(KResetPin, 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
   106
	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
   107
		{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
		r = GPIO::SetPinDirection(KResetPin, GPIO::EOutput);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
		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
   110
			{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
//			GPIO::SetOutputState(KResetPin, GPIO::ELow);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
			GPIO::SetOutputState(KResetPin, GPIO::EHigh);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
//			GPIO::SetOutputState(KResetPin, GPIO::ELow);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
			Kern::NanoWait(25000); // should be > 10us
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
//			GPIO::SetOutputState(KResetPin, GPIO::EHigh);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
			GPIO::SetOutputState(KResetPin, GPIO::ELow);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
			}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
		}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
//	Kern::NanoWait(1000000);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
//	SoftReset();
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
//	Kern::NanoWait(1000000);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	iInterface.Write(KMasterReadStartAddr, X1_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
   126
	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
   127
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
TInt TouchController::SoftReset()
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	LOG_FUNCTION_CALL;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	for(TInt i = 0; i<4; i++)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
		iCtrlRegsCache[i] = 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
   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
	return iInterface.Write(KControl_0, KControl_0_SWRST);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
TInt TouchController::SetTouchMode(TTouchMode aMode)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	LOG_FUNCTION_CALL;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	iCtrlRegsCache[0] &= ~KControl_0_MODE_MASK; // clear all mode bits
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	switch(aMode)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
		{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
		case ESingle:
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
			iCtrlRegsCache[0] |= KControl_0_MODE_SINGLE;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
			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
   147
		case EMulti:
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
			iCtrlRegsCache[0] |= KControl_0_MODE_MULTI;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
			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
   150
		case EGesture:
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
			iCtrlRegsCache[0] |= KControl_0_MODE_GESTURE;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
			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
   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
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	return iInterface.Write(KControl_0, iCtrlRegsCache[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
   156
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
TInt TouchController::SetResolution(TResolution aResolution)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	LOG_FUNCTION_CALL;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	iCtrlRegsCache[0] &= ~KControl_0_RM_12; // clear all mode bits
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	if(aResolution == ERes12Bits)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
		{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
		iCtrlRegsCache[0] |= KControl_0_RM_12; // set bit
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
		}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	return iInterface.Write(KControl_0, iCtrlRegsCache[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
   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
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
TInt TouchController::SetLongerSamplingRate(TUint aRate)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	LOG_FUNCTION_CALL;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	iCtrlRegsCache[0] &= ~KControl_0_LST_MASK; // clear bits..
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	iCtrlRegsCache[0] |= aRate & KControl_0_LST_MASK; // set new 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
   176
	return iInterface.Write(KControl_0, iCtrlRegsCache[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
   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
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
TInt TouchController::SetIrqActiveTime(TUint aIrqActiveTime)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	LOG_FUNCTION_CALL;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	iCtrlRegsCache[1] &= ~KControl_1_PAT_MASK; // clear bits..
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	iCtrlRegsCache[1] |= (aIrqActiveTime << KControl_1_PAT_SHIFT) & KControl_1_PAT_MASK; // set new 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
   185
	return iInterface.Write(KControl_1, iCtrlRegsCache[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
   186
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
TInt TouchController::SetPanelVoltageStabTime(TUint aVoltageStabilizationTime)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	LOG_FUNCTION_CALL;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	iCtrlRegsCache[1] &= ~KControl_1_PVT_MASK; // clear bits..
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	iCtrlRegsCache[1] |= (aVoltageStabilizationTime << KControl_1_PVT_SHIFT) & KControl_1_PVT_MASK; // set new 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
   194
	return iInterface.Write(KControl_1, iCtrlRegsCache[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
   195
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
TInt TouchController::SetNumberOfColumns(TUint aNumberOfColumns)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	LOG_FUNCTION_CALL;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	iCtrlRegsCache[2] &= ~KControl_2_C_MASK; // clear bits..
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	iCtrlRegsCache[2] |= (aNumberOfColumns << KControl_2_C_SHIFT) & KControl_2_C_MASK;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	return iInterface.Write(KControl_2, iCtrlRegsCache[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
   204
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
TInt TouchController::SetNumberOfRows(TUint aNumberOfRows)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	LOG_FUNCTION_CALL;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	iCtrlRegsCache[3] &= ~KControl_3_R_SHIFT; // clear bits..
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	iCtrlRegsCache[3] |= (aNumberOfRows << KControl_3_R_SHIFT) & KControl_3_R_MASK; // set new 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
   211
	return iInterface.Write(KControl_3, iCtrlRegsCache[3]);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
TInt TouchController::EnableWindowMode(TPoint aStart, TPoint aStop)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	LOG_FUNCTION_CALL;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	TBool error_occured = 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
   219
	// setup window 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
   220
	TInt r = iInterface.Write(KWindowXStart_Msb, (TUint8)(aStart.iX >> 8));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	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
   222
		error_occured = 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
   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
	r = iInterface.Write(KWindowXStart_Lsb, (TUint8)(aStart.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
   225
	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
   226
		error_occured = 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
   227
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	r = iInterface.Write(KWindowYStart_Msb, (TUint8)(aStart.iY >> 8));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	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
   230
		error_occured = 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
   231
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	r = iInterface.Write(KWindowYStart_Lsb, (TUint8)(aStart.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
   233
	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
   234
		error_occured = 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
   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
	r = iInterface.Write(KWindowXStop_Msb, (TUint8)(aStop.iX >> 8));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	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
   238
		error_occured = 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
   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
	r = iInterface.Write(KWindowXStop_Lsb, (TUint8)(aStop.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
   241
	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
   242
		error_occured = 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
   243
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	r = iInterface.Write(KWindowYStop_Msb, (TUint8)(aStop.iY >> 8));
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	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
   246
		error_occured = 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
   247
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	r = iInterface.Write(KWindowYStop_Lsb, (TUint8)(aStop.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
   249
	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
   250
		error_occured = 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
   251
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	// enable 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
   253
	if(!error_occured)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
		iCtrlRegsCache[1] |= ~KControl_1_WS; // set enable bit..
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
		r = iInterface.Write(KControl_1, iCtrlRegsCache[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
   257
		}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	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
   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
		r = KErrGeneral;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
		}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	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
   263
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
TInt TouchController::DisableWindowMode()
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	LOG_FUNCTION_CALL;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	iCtrlRegsCache[1] &= ~KControl_1_WS; // clear enable bit..
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	return iInterface.Write(KControl_1, iCtrlRegsCache[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
   270
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
TInt TouchController::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
   273
	{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	TUint8 val = 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
   275
	return iInterface.Read(KTouchNumberAndType, val);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
TInt TouchController::GetMeasurements(TPoint* aPoints, TInt& aNumPoints)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	LOG_FUNCTION_CALL;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	TInt r = KErrArgument;
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	TInt num_points = 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
   283
	if(aPoints)
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
		{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
		// check how many points is there to read..
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
		TUint8 val = 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
   287
		r = iInterface.Read(KTouchNumberAndType, val);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
		//Kern::Printf("KTouchNumberAndType %x", val);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
		// if in multi mode - read all received, but only up to one otherwise..
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
		num_points = val & (val & KTouchNumberAndType_MULTI ? KTouchNumberAndType_TouchNMask : 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
   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
		// setup the transaction:
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
		for (TInt i = 0; i < num_points; i++) // if anything was touched at all..
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
			{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
			// get 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
   297
			r = iInterface.Read(X1_H + (i << 2), val);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
			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
   299
				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
   300
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
			aPoints[i].iX = TInt(val << 8);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
			r = iInterface.Read(X1_L + (i << 2) , val);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
			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
   305
				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
   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
			aPoints[i].iX |= TInt(val);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
			// get 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
   310
			r = iInterface.Read(Y1_H + (i << 2), val);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
			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
   312
				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
   313
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
			aPoints[i].iY = TInt(val << 8);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
			r = iInterface.Read(Y1_L + (i << 2) , val);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
			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
   318
				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
   319
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
			aPoints[i].iY |= TInt(val);
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
			}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
		}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	// update number of 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
   325
	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
   326
		{
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
		aNumPoints = 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
   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
	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
   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
		aNumPoints = num_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
   332
		}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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
	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
   334
	}
d93b485c1325 updated SPI. Added template touch (byd_touch) -WORKING version,does not work-needs update as I missunderstood how the touchcontroller(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